According to bitcoin.com,
Bitcoin mining is the process of making computer hardware do mathematical calculations for the Bitcoin network to confirm transactions and increase security. As a reward for their services, Bitcoin miners can collect transaction fees for the transactions they confirm along with newly created bitcoins.
Most bitcoin miners these days use GPU (graphical processing unit) mines rather than CPU (central processing unit) mines due to their huge advantage in speed (instructions per clock) and greater number of ALUs (arithmetic/logic units). “As a result, they can do large amounts of bulky mathematical labor in a greater quantity than CPU’s.” -Why a GPU mines faster than a CPU