Through transactions. Miners process transactions by mining the block that your transactions are on. The fees people pay on top of the amount they send will go to the miners that are processing the block.
isn't there 21 millions coins only to be mined and if there are no transactions my mining rig will not work?