Animals need oxygen. They breathe in oxygen. They breathe out carbon dioxide as a waste product. Plants need carbon dioxide to perform photosynthesis . Photosynthesis is the way plants make their food, which is called carbohydrates.
Plants use sunlight for energy and make carbohydrates out of carbon dioxide and water.
Oxygen, which animals need to live, is a waste product of photosynthesis, along with tiny drops of water. We call this transpiration . So, animals depend on plants for oxygen, and plants depend on animals for carbon dioxide. Animals and plants both have to have water. This exchange is a natural cycle.