As explained in the "Physics" and "Physiology" sections, when we dive, our body tissues absorb nitrogen. In those sections you learned that according to William Henry's law, the amount of gas a liquid can absorb is related to pressure. Since the pressure under water is considerably higher than above water, our body absorbs more nitrogen when diving, and ever more so the deeper we dive. As we come back up, the pressure decreases, the fluids in our body can carry less absorbed gas, and the nitrogen gets expelled from the tissues again.
For a simple, somewhat dramatic, visual explanation of how absorbed gas leaves a liquid as pressure decreases, picture a bottle of carbonated soda that's been shaken a bit. When you unscrew the cap, pressure is suddenly reduced and the soda foams as carbonation is released. That happens because the pressure inside the bottle dropped when you unscrewed the cap. It's even more dramatic when you pop open a can of beer. Shake either a bit and you really see how gases get expelled from a liquid as pressure suddenly drops. This same thing is happening in your body as you ascend. Much more slowly and much less dramatically, of course. But it's also much more serious. You do NOT want nitrogen rapidly bubbling out of your tissues and clogging up your blood circulation or bubbles getting lodged in other areas. This is why it is essential to slowly and safely release nitrogen as you ascend, and not build up too much in the first place. That is where the dive planners come in. They tell you how long you can dive at certain depths and how long it will take to get rid of all the extra nitrogen in your system.
Recreational dive planners do not actually tell you how much nitrogen is inside your body. They simply tell you how many minutes you can stay, max, at certain depths without having to do decompression stops, something that is not part of recreational diving and that you should never have to do as a recreational diver. The tables have been around for about a hundred years and are all based on data originally developed by the United States Navy. The data is the result of applying the gas laws on the human body, by making certain guesses, developing certain models, and by numerous studies, observations and tests conducted over many years.
All of that led to the "dive tables" that were first used by the Navy, and then, as recreational scuba diving became popular, modified for recreational use. In 1988, Diving Science & Technology introduced the first dive tables for no-decompression recreational diving. You might guess that the recreational dive tables have a significant safety margin built in. Do not take that to mean you should simply use the numbers as loose guidelines. No way. In fact, if anything, be even more conservative when planning your dives than the table data suggests.