Crypto mining is the process of validating transactions and adding new blocks to a proof-of-work blockchain by solving a hard computational puzzle. It produces both the security that confirms transactions and the newly issued coins paid out as the block reward.
Miners run specialised hardware that races to find a number which, when hashed with the block's data, meets the network's difficulty target. The first to find a valid solution broadcasts the block, the network checks it, and the winner collects the block reward plus transaction fees. The network adjusts the difficulty so that blocks keep arriving at a roughly steady pace as more or less computing power joins in.
Staking is the proof-of-stake counterpart: instead of spending computing power, participants lock up coins as collateral and are chosen to validate blocks, earning rewards for honest behaviour and risking their stake for dishonest behaviour. Mining secures a chain with energy and hardware; staking secures it with capital at risk.
You run a mining rig that contributes computing power toward solving the next block.
When your rig finds a valid solution first, you collect the reward:
valid solution found to block accepted to block reward + transaction fees paid
If a competing miner solves it before you, they take the reward instead, so your payout depends on winning the race rather than on coins locked up, as it would be in staking.