Governments give out time-limited patents to help encourage inventors to continue driving innovation and the advancement of science. Without such protection, the threat of someone stealing an idea could discourage inventors from creating new things. The founding fathers of the United States knew this when they gave Congress power to grant patents in the Constitution (Article 1, Section 8).
Due to advancing technology and growing awareness of the value of patents, the past decade or so has seen an explosion in the number of patent applications. In 2008, the USPTO took in 485,312 patent applications and granted 185,224 patents [source: USPTO].
You'll work with one patent examiner throughout the process. Examiners of utility patents must have an engineering or scientific background.
It's very rare for an examiner to grant an allowance to a patent on the first try. More than likely, the examiner will give you a non-final rejection which allows you to amend your claims (make them narrower), respond (argue) or both. Next, the examiner might give you a final rejection. However, you can still send in an after-final amendment or argument. You can also file a continuation application, which means starting over with new claims, resubmitting the specification and other paperwork, and getting a new serial number and filing date (while still keeping the priority of the earlier filing date). Or, if you file a Request for Continuing Examination (RCE), you can send in another amendment without resubmitting the specification or getting a new filing date. Another option is to appeal to the Board of Appeals and Patent Interferences (BAPI).
Of course, for this process to be worth it, you need to be convinced your invention is valuable. While prosecution is going on, and regardless of if you're granted a patent, you can still make money off your invention or even license it to someone else. The licensing agreement applies whether or not you're granted a patent.
As you can probably guess, the drafting and prosecution of an application can get extremely complicated. An attorney who specializes in the process can help you navigate the system. However, the more the inventor knows about the process, the better, so you can work together to gain the most legal ground.