As explained in the article How Bitcoin works new bitcoins are generated each time a new block is created, on average once every ten minutes. Currently 12.5 bitcoins are created each block (this number is halved roughly every four years) and assigned to the person creating the block.
Creating a block is trial-and-error work where the task is to find a hash value smaller than a certain threshold. The quicker you can generate hash values the greater your chance is to be the one creating the next block.
Since so much computing power all over the world is competing it would take a very long time to create a block on your own. Because of this most miners choose to join a so called mining pool where everybody's resources are pooled together and the reward from any block found is split among the members of the pool.
Before deciding that you want to be part of the money-creating business (who doesn't?) it is worth knowing a bit about how the mining industry evolved and what it looks like today.
When Bitcoin was introduced by Satoshi in 2009 a mining option was built in to the Bitcoin application. You simply checked the option "Generate coins" and the program started trying to create blocks.
Your computer would use its regular processor (CPU) for this work and hence the fans in your computer would get quite noisy, so a lot of people simply left this unchecked. A bitcoin wasn't really worth anything anyway.
It didn't take long for some to realize that there was a faster way of generating bitcoins, namely by using the computer's graphics card (GPU). Already in December 2009 Satoshi urged people to delay this so that "regular people" would still have the possibility to create coins. One reason for this was that there were no established way of buying bitcoins at this time. Creating them was simply the most convenient option.
We should have a gentleman's agreement to postpone the GPU arms race as long as we can for the good of the network. It's much easer to get new users up to speed if they don't have to worry about GPU drivers and compatibility. It's nice how anyone with just a CPU can compete fairly equally right now.
Anyway, the development of GPU miners couldn't be stopped and soon this was the new standard.
The reason that a graphics card is better than a standard processor at mining is (somewhat simplified) that it is more optimized to "do math". Normally this is used to display pretty graphics but also works quite well for calculating hash values. But there are even better ways.
An FPGA is a programmable, integrated circuit, i.e. hardware whose function is programmable at a very low level. The next step in optimizing mining was then to program these circuits to perform the hash function (SHA-256) that is used in Bitcoin.
FPGA:s were the primary option during a year or two but soon had to give way to the next natural step in the evolution of mining - specific hardware created with the sole purpose of mining Bitcoin, or ASICs (application specific integrated circuits). In early 2013 ASIC:s first became available to the general public but now mining also started to turn into an industry and the number of hobby miners declined steadily.
The competition in mining was getting fierce. There is a simple calculation that every miner has to make. Income from newly generated bitcoins and transaction fees needs be higher than the total expenses. Sounds simple enough, but making a forecast is not necessarily that easy.
The income depends on the total hash rate in the Bitcoin network (i.e., how many other miners are there and what kind of hardware they have) and also on the current exchange rate of bitcoin to your local currency. Both of these parameters vary greatly so making a budget covering the life span of your hardware is tough. You expenses are the cost of the hardware and ongoing costs, mainly electricity. If you want some help calculating your expected profit, there are mining calculators to assist you.
The slightest advantage in any of those areas make a big difference so ask yourself this before trying to start a mining operation.
In short, if you are looking to acquire a sum of bitcoin because you believe in the technology and want to get your part of the possibly rising value it is probably much simpler to buy some bitcoin now, instead of trying to start a mining operation.
There are many altcoins that use other hash functions than Bitcoin where it might still be profitable to mine coins using your standard PC, read for example this article. Remember though that the cost of electricity is still an important factor that you need to consider when calculating whether or not it is worth the effort.