A patent is a contract between the inventor and the public. The inventor agrees to make known publicly his invetnion to further the progress of technology. In return, the public (or government) excludes others from practicing the invention for a limited amount of time. In the United States, this limited amount of time is 20 years from the day the patent applicaton is filed.
Note well that a patent excludes others from practicing the invention, and does not give the inventor the exclusive right to practice the invention. This is because practicing the invention may infringe on another's patent.
Imagine for example that 5 years ago a flying car is invented and patented by one of the big three auto makers. Essentially the patent covers any cars which can fly by use of retractable wings.
You notice that an improvement can be made to the wing design so it retracts more smoothly, allowing for better gas mileage. You patent the improvement to the wing design. You can not make and sell cars with your wing design because you will be infringing the original patent which has broad coverage for flying cars. Yet at the same time, that big three auto maker can not incorporate your wing improvement into their car.
This is where licensing agreements and selling of patent rights comes in. And this is not my area of expertise or practice, so I will leave it at that.