Instead of air, they are able to use the oxygen and carbon dioxide found in the water.
Even though we know a heavily planted tank is the way to go, plants are only able to help us if they are kept in the proper conditions. The main requirements that plants need to grow are: water, light, air, nutrients, and an ideal temperature. For the aquatic plants in our aquariums, water is never an issue. Instead of air, they are able to use the oxygen and carbon dioxide found in the water. Usually, aquariums in a typical household should stay in a temperature range that is ideal for your aquarium plants. There are also heaters available to keep the temperature stable. So the remaining factors of light and nutrients are the ones that need to be addressed.