Bitcoin mining requires specialized computer hardware that is expensive and consumes huge amounts of electricity. It can also be a lucrative activity depending on price movements and your ability to maximize profitability.
Cryptocurrency mining verifies transactions and adds them to blockchains. Miners earn rewards for this work, which is akin to guessing a password in order to open a treasure chest.