How does bitcoin actually work

The math behind cryptocurrencies.