Blockchain is defined as a highly secure decentralized database, storing transactional information on a ledger over a peer-to-peer network. The keyword here is highly secure, because no where does it state that a blockchain such as the one running Bitcoin is impenetrable.
A blockchain is a chain of individual blocks that store various transactions over a short period of time. For Bitcoin, a new block is created every 10 minutes, so all transactions made within the 10 minute interval will be part of this block.
In order for the block (containing a set of transactions) to be added to the blockchain, miners must compete by racing to solve a extremely difficult and highly computational cryptographic puzzle. The amount of computational energy that is required to complete this task is the cost of participating. The reward for successfully solving the puzzle is some form of payment in the respective cryptocurrency that the blockchain is supporting.
The secure aspect of this protocol comes from the consensus algorithm that ensures the next block is the only version of the truth across all nodes once mined. If the block has been successfully mined and was somehow altered, the altered version of the ledger would be quickly identified and rejected by the peer-to-peer network of users, since there all other users in participation will have the correct ledger.
Although a 51% attack would not completely dismantle a largely backed cryptocurrency such as Bitcoin, it would result in the public loss of confidence in the coin and the technology behind it. Panic would consume the exchanges, resulting in selling off Bitcoin investments that would inevitably crash the market.
The reason for this attack being hypothetical is because it would cost billions of dollars to invest into the hack. The processing power required to consume over 50% of the network's mining hashrate is not feasible in today's world due to the cost, but maybe it will be in the future.
Cheers,
@brianjuice