Miners are tasked with solving a hashing problem, which them miners to find the correct inverse value for a designated hash. Once a miner successfully solves this equation, they get a block reward (newly-minted coins), and the transaction fee is shared as commissions with others.