https://en.bitcoin.it/wiki/How_bitcoin_works
but basically you mine blocks of data and it's completely random who might find the bitcoin in a certain block. Also, there is a limited amount of "blocks", which are just data string, and at the current rate, they expect mining will stop around 2050. Even now, mining is starting to get harder and harder as more bitcoins are found, since each time a block is exhaust, it's gone forever, there are no replacements. Bitcoin can't just "print money" like the governments
When I was doing the mining I had joined a mining "pool", where we all combine the power of our machines together and whenever any of us got a bitcoin, we would share the profit. If your interested, this is probably the better way to go.