Theory:

Some of the plants live in the mountains, some live in plains, while others are found in water. Similarly, animals found in the mountains are different from those found in the deep ocean. There are varieties of places for plants and animals to live.
Every living organism requires a place to survive and sustain, such place where organisms live is called, habitat.
Habitat provides food, water, air, shelter, and the other requirements needed for the organism. Various types of plants and animals share the same habitat. Habitat has two components - biotic and abiotic components.
Biotic Components
The living components which includes the plants and animals of a habitat are called the biotic components.
Abiotic Components
The non-living components like air, water, rock, light, heat, and soil of a habitat are called as the abiotic components.
There are two major types of habitats which are:
  1. Terrestrial habitat
  2. Aquatic habitat