A 51% attack can happen when a malicious individual or group of miners who control over 50% of the network's computing power (hashrate). This would allow them to perform actions such as preventing new transaction confirmations, cancel or deny others' transactions, reverse current transactions (double spend), or monopolize mining new blocks to take all of the rewards for themselves.
Performing a 51% attack would require an extremely high upfront cost in order to have enough hardware to dominate the network's hashrate. In the current state of the Bitcoin network, this would have a high degree of difficulty to perform. A 51% attack would also be unable to alter previous blocks or create new bitcoins. Such an attack has never occurred on the Bitcoin network. However, one was performed on Ethereum in August of 2016.
If the threat of a 51% attack appears, bitcoins would lose value due to the perceived loss of safety. In December of 2013, mining pool Ghash.io appeared to be on track to exceed the 50% mark which caused bitcoins to lose some value. In July of 2014 they temporarily exceeded 50% of the network's hashrate. In response, they voluntarily reduced their power and stated that they would never exceed 40% again."