The variety of living organisms in an ecosystem and the changes taking place in their natural habitats.