For a good summary of information on patents, see this guide from the United States Patent and Trademark Office (USPTO).
WHAT TYPES OF PATENTS ARE THERE? There are 3 types of patents: utility (a new and useful process, machine, manufacture, or composition of matter, or a new and useful improvement thereof); design (new, original, and ornamental design for an article of manufacture); and plant (new and distinct, invented or discovered asexually reproduced plant). Utility patents are the most common.
HOW DO I FILE A PATENT? See this guide on filing a utility patent application, and see this flow chart on the patent application process (courtesy of the USPTO).