How proof of work prevents double spend One article I am reading said that proof of work system is used in Bitcoin to prevent double spending. More particularly: 

Imagine we are protecting against double spending in following way. When Bob receives transaction from Alice saying that "Alice transfers some 1234 BTC to Bob", bob would broadcast this to entire network to ask them to verify whether this is a legitimate transaction. In the mean time say if Alice had sent also same message to Charlie (saying that she is transfering same 1234 BTC to Charlie), Charlie would have also broadcast this message and other nodes on the network would spot that Alice is trying to spend same 1234 BTC with two persons, and they would let Bob (or Charlie) know that this is invalid transaction. Or if all is ok Bob or Charlie would wait till some nodes send acknowledgment that this is valid transaction.

SOCK PUPPET ATTACK: Above scheme would work but Alice could cheat in the following way. She could create say one million fake identities on network, and they would lie to Bob and Charlie that the transactions was valid- making them accept payment.

Now comes my question. It seems proof of work was introduced in Bitcoin to prevent exactly the above kind of sock poppet attack. But I fail to see how proof of work helps protect against above sock puppet attack. Why would Alice not be able to introduce those fake 100000 identities on the network anymore?

Can someone ealaborate and explain?

ps. I know what proof of work is, this question is more related how and why it prevents above mentioned sock puppet attack.
It is not really the Proof of Work which prevents double spends but rather the blockchain itself which prevents double spends. The Proof of Work is just one aspect of the blockchain.

For a transaction to be considered final, it must be in the blockchain. Otherwise it could disappear forever and everyone forgets about it. For a transaction to be added to the blockchain, it must be included in a block, and miners will do a Proof of Work for the block. In order for the transaction to be included in a block, the outputs that it spends from must have not been spent by any other transaction in the blockchain nor by any other transaction in the block. If such an other transaction exists in the blockchain, then the block will be invalid. 

It is this process of including transactions in blocks which avoids double spends. It essentially establishes an order and says "this transaction is the real transaction, all others which spends any of the outputs which this transaction spends are fake".

The proof of work mechanism exists in Bitcoin because that is what makes the blockchain immutable. A valid proof of work means that a miner is proving that they did a certain amount of work, on average, in order to produce a block. In order to replace that block, someone else must also do about the same amount of work for that block. If someone wanted to modify a block in the blockchain and have everyone accept it, that person must perform the same amount of work that went into creating the block, then do the same for every single block that follows it because those blocks would be invalid since a block in their history has changed. This makes the blockchain immutable; the amount of work required to rewrite history is considered to be infeasible and much too costly to do practically. That is what the Proof of Work is for.