Cryptocurrency mining is the process of verifying transactions between users before they are added to the blockchain public ledger.
Mining needs a computer and a special program and hardware (like a GPU), which helps miners compete with their peers in solving complicated mathematical problems.
This requires huge computer resources. In regular intervals, miners would attempt to solve a block having the transaction data using cryptographic hash functions.
Newly minted units are distributed ad-hoc to agents (e.g. miners, stakers, bakers) that satisfy the necessary conditions specified by the protocol (e.g. find a valid proof-of-work).