In a PoW consensus system, validators need to solve complex mathematical problems to verify transactions, while in a PoS consensus, nodes must stake a certain amount of the local token to become a validator. A 51% attack occurs when an individual or group acquires control of the majority of the network or holds more than 50% of the staked tokens. This type of attack allows the attacker to modify the transactions and blocks of the network, which is cryptographically linked. In this scenario, the control of the network passes to the person or people who carried out the attack.