A patent allows the creator of certain kinds of inventions that contain new ideas to keep others from making commercial use of those ideas without the creator's permission. For example, Tom invents a new type of hammer that makes it very difficult to miss the nail. Not only can Tom keep others from making, selling, or using the precise type of hammer he invented, but he may also be able to apply his patent monopoly rights to prevent people from making commercial use of any similar type of hammer during the time the patent is in effect (20 years from the date the patent application is filed).
Generally, patent and trademark laws do not overlap. When it comes to a product design, however -- say, jewelry or a distinctively shaped musical instrument -- it may be possible to obtain a patent on a design aspect of the device while invoking trademark law to protect the design as a product identifier. For instance, an auto manufacturer might receive a design patent for the stylistic fins that are part of a car's rear fenders. Then, if the fins were intended to be -- and actually are -- used to distinguish the particular model car in the marketplace, trademark law may kick in to protect the appearance of the fins.
For more information about patent law, see the Patents section of Nolo's website.