What is a blockchain and how does it work?