Mining is creating new blocks to be added to the bitcoin block-chain. You will be given a kind of mathematical puzzle to solve and the first to solve it gets a reward. Every time you try to solve the puzzle and fail, the system recognizes the failure and keeps it as a means of strengthening the bitcoin security.