seigs,
You've got it - they evolved together. One example is how the chemical composition of the atmosphere changed by plants that released oxygen into the air. This completely changed the environment and the organisms had to adapt or die out (oxygen is actually quite poisonous for certain organisms). Other events changed the environment, such as Ice Ages, Meteor impacts, earth quakes, drought, etc. Of course, there are also an innumerable amount of microenvironments on the earth, from the oceans to the mountains to deserts, freshwater lakes, swamps, glaciers, forests, jungles, etc. Many of these environments only exist because of life (trees, microbes, insects, etc.)
It almost seems to me like a positive feedback loop in which the more organisms there are in the earth, the more potential environments there are. This can also include simbiotic relationships and parasite/host relationships (which are kinda like environments in themselves).
Natural Selection selects the most successful organism that exploit these environments which may lead to further environmental changes down the line.
rem
"We all do no end of feeling, and we mistake it for thinking." - Mark Twain