To understand how the blockchain avoids double spending, you should know that since the delivery of the first Bitcoin client in 2009, the Bitcoin blockchain has kept a complete record of each transaction. Since all transactions are cryptographically hashed to the previous blocks, you can not simply change the record. This record is called a blockchain because a new transaction group, called a block, is added every ten minutes. The blockchain prevents double-spending by timestamping transaction groups and then distributing them to all the nodes of the bitcoin network. The transactions being timestamped on the blockchain and mathematically related to the previous ones, they are irreversible and impossible to alter.