A patent is a license granted to an inventor by the government, giving the inventor the right to exclude others from making, using, or selling his or her invention for a set period. In exchange for sharing the details of your invention with the world, you are allowed to monopolize your invention for up to 20 years. (This, by the way, is one reason prescription medicines are so expensive before generics can be sold.)