Nowadays divers have access to modern demand value regulators and pressurized scuba tanks. These innovations have solved the problems associated with the older techniques.
For every 33 feet (10 m) deeper you dive, pressure increases 1 atm (one atmosphere). When you dive deeper, your lungs and chest have to counteract the force caused by the pressure. This is due to the fact that air is easily compressed. If you are breathing surface air it's even harder. The reason breathing surface air down below is harder is because that air stays at 1 atm.
Pressurized air is what you need in order to counteract the increased pressure. Also, when you go deeper gases in your body compress somewhat. The amount of compression that occurs is small but significant. At sea level, air is approximately 78% nitrogen and 21% oxygen. Also present are gasses, mostly argon, in trace amounts. Unfortunately, as pressure underwater changes, the nitrogen and oxygen mixture changes. In order to maintain the optimal concentration of oxygen, a modern regulator must be used.
The great thing about modern scuba diving air delivery systems is that they compensate for these circumstances as they occur. The result is just the right mixture of nitrogen & oxygen and pressure for divers, as they go deeper in the water. Most dives are recreational and thus done using a mask that covers the nose and eyes. Of course, breathing is done through the mouth.
This situation results in a problem. The problem is that the diver's mouth is wrapped around the mouthpiece portion of the regulator. When you breath in, air comes into your lungs. First your lungs use the inhaled air and then they exhale the remaining air. Part of the exhaled air is carbon dioxide.
Typically you inhale 21% oxygen and then exhale 18% oxygen. The difference is 3%. The 3% is carbon dioxide. Unlike carbon monoxide, carbon dioxide isn't so toxic to breath. However, if you breath too much of it, it cuts into the amount of oxygen you can consume.
After a while, that would result in you not getting enough oxygen. Oxygen starvation causes disorientation, light-headedness and perhaps even death. The modern regulator and tank system vents exhaled gas into the surrounding ocean and that solves this problem. If you were to exhale through your nose while underwater, you would fog up the glass on your goggles and you would not be able to see properly.
You can now see how the modern system is really quite clever. While scuba diving you're inhaling and exhaling using the same mouthpiece and hose. In order to vent carbon dioxide directly into the ocean water, you need some fancy engineering.
Modern configurations are mostly open circuit 2-stage regulators. The "father" of the modern Aqua-Lung is Jacques Cousteau. He and Emile Gagman designed and build it during world war two and it was only one stage.
In either the case of a one stage or a two-stage system, breathable air is delivered to the diver that matches the ambient pressure of the diver.
Air is pressurized to 200 atm inside the tank. In the case of the 2-stage system, the first stage reduces pressure to about 10 atm. A demand regulator in a two-stage system, brings the pressure down again to that if the surroundings.
The result is that divers gets air at the best pressure for their lungs, thus counteracting the ambient pressure. The diving systems of today provide safe and healthy air, reliably to scuba divers while underwater.