There are two components of a habitat:
Biotic Components:
Living things such as plants and animals in a habitat are its biotic components.
Abiotic Components:
Non-living things such as soil, rock, water, air in a habitat constitute the abiotic components.