There are many good tutorials on the web.
Basically though the so-called miners consume the enormous amount of electricity, not just to power their specialist computers but also to cool them. Most mining is done in China, where there is local overcapacity of electricity production that can therefore be obtained cheaply at times. A cold climate also helps.
The miners are the distributed bookkeepers. They collect new transactions into a block of data but then have to find a hash that is deliberately made to be very difficult. The hash locks the block and includes the hash of the preceding block thereby locking the chain. Many computers are burning vast amounts of energy trying to be the first with a new block, 99% of this energy is wasted but is an inherent part of the system design. This can’t be reduced to a single computer (as with a bank) because the whole design is based on only trusting the majority vote of multiple independent bookkeepers. (If one actor corners 51% of the computer power in the network then he can take all). The first computer to find the hash for a new block gets paid by new coin (invented out of thin air), also gets any transaction fees that have been added to a transaction to get it ahead in the queue.
The vast electricity cost and the slowness of the process mean that (e.g.) Bitcoin cannot be a currency (i.e. for buying everyday things).
A good set of charts is here
https://bitinfocharts.com/comparison/bi ... me.html#3mand shows for BTC that block time is around 10 minutes and transaction fees around 30 dollars. (this doesn’t take into account the electricity as that is rewarded by new bitcoins generated by the protocol.)