51% Attacks, how do they work?

We always hear about 51% Attacks, but how are they performed? Here are some extremely simplified explanations…

Using the 51% attack to get all the mining rewards:

a) 51Pool finds a block and pockets it.
b) OtherPool finds a block
c) 51Pool finds another block and publishes them both, orphaning OtherPool
d) 51Pool is the only pool that can mine on the network.

You always need to mine on top of the chain. You can’t mine on top of the block that you don’t know.

– fireice_uk

Using the 51% attack to reorganize the blockchain:

I think a more common case for a 51% attack is to have a parallel chain with blocks, typically with transactions removed or modified, and then use the 51% hashrate to push this chain onto the network, reorganizing the blockchain and thus re-writing history in terms of the transactions that have taken place. Say, I have made a big transaction to an exchange, and I have a modified version of the blockchain with this transaction removed. I let the deposit go through, then cash out to another coin, then pour a ton of hashrate on the network, trying to convince the network that your chain is the longest and correct one.
the end result is the exchange lost money

– c4

A common misconception is, that 51% attackers can change the rules of the network but this is simply not true. That’s also why running your own node is important. Your node would reject anything which ignores network rules, regardless of hashpower. The 51% must work within the rules, otherwise it would be a forked altcoin which nobody uses.