Bitcoin uses a blockchain to prevent double spending in a distributed system. The blockchain is a global ledger that sorts transactions into a linear order. It is very difficult to rewrite a large portion of the blockchain due to the computational power required to solve puzzles needed to add blocks. This makes double spending improbable without controlling over 50% of the network's hashing power. New blocks are added about every 10 minutes through a proof-of-work process where miners solve difficult puzzles to write blocks and receive bitcoins as a reward.