Miners takes data related to the last transactions on the network, the hash of the previous block, add some random (in brute force) and try to get a hash that starts with leading ZEROs in the resulting HASH.
If enough 0 are found, (it's related to difficulty) you get a block and a reward. For bitcoin, since november 2012, it's 25 BTC+fees of added transactions.
Mining is the process of securing the transactions (by making it hard to forge fake blocks) and also CREATE the crypto currency. BTC are created ex nihilo ... but in exchange of a crypto challenge...
hope this can help you ... keep reading ...