The Earth's oxygen is completely dependent on trees and plants. They produce oxygen and absorb carbon dioxide. This oxygen is very important for life on earth. It will be many millions of years before the earth runs out of oxygen.
Elemental oxygen did not appear on Earth until some time after life did. In fact, the oxygen was produced by life carrying out photosynthesis. The first organisms on Earth were anaerobic, meaning their life processes did not involve oxygen. To most organisms like this, oxygen was highly toxic.
The only planet with oxygen (known to Man) is Earth. That is to say, only Earth has a significant amount of the element oxygen in its atmosphere. Other planets do have oxygen, but it is chemically combined in the form of compounds, like carbon dioxide.