Mining is the process used by proof-of-work blockchains, such as Bitcoin, to confirm transactions and add new blocks to the chain. Miners compete using specialized computer hardware to solve a mathematical puzzle, and whoever solves it first earns the right to add the next block and receive a reward in new coins.
This process requires significant electricity and hardware investment, which is one reason proof-of-work networks have faced criticism over their environmental footprint. It is also why mining has shifted from individual hobbyists toward large-scale mining farms that can operate at a lower cost per coin produced.
For most beginners today, mining major coins like Bitcoin at home is no longer practical because the competition from large industrial operations is too high. Buying coins directly on an exchange is usually a more realistic entry point.