Oxygen comes from many places, including air, water, rocks, plants, living organisms and even the atmosphere. Oxygen is produced in abundance by trees, plants and living organisms, including humans. It originates from the ground, the water and even the ozone layer of the atmosphere.
Unlike humans, trees inhale carbon dioxide and exhale oxygen, releasing vast quantities into the air in the process. Oxygen that forms in the air does so in the ozone layer, which also protects the Earth from destructive ultraviolet rays. Oxygen is produced high in the air as well as by algae, bacteria and many terrestrial and aquatic plants, which generate oxygen during photosynthesis.