Mining is the process by which Bitcoin transactions are secured. To this end the miners perform with their computer hardware mathematical calculations for the Bitcoin network. As a reward for their services, they collect newly created bitcoins as well as transaction fees that they confirm. Currently this reward is 12.5 bitcoins per block. It is halved every four years or so.
Minors (or miners' cooperatives) compete and their incomes are proportional to the computing power deployed.
"To describe the mining, we could use the example of a huge sudoku contest where participants start a new grid as soon as someone finds a solution, and whose difficulty is adjusted so that on average a grid is resolved every ten minutes. Imagine a giant grid of sudoku, with many thousands of rows and columns. It would be easy enough to check that a completed grid is full. But [...] it will take a lot of work to finish! The difficulty of grids can be adjusted by changing their sizes, [...] but they can still be easily checked even if they are very large. The puzzles to solve in the bitcoin network are based on cryptographic hashes and have the same characteristics as these sudoku grids: they are very difficult to solve but it is very easy to verify that a solution is good, and their difficulty can be adjusted. - Andreas M. Antonopoulos.