A proof of work is a piece of data which was resource-intensive and time-consuming to produce so as to satisfy certain requirements.
Producing a proof of work is usually a random process with low probability, and a lot of trial and error is required before a valid proof of work is generated. Bitcoin uses the Hashcash type of proof of work.
Additionally, the miner is awarded the transaction fees paid by users. The fee is a sort of incentive for the miners to include the transaction in their block. In the future, the fees will make up a significant percentage of mining income.
There are two main types of mining: Solo and Pool.