An ecosystem is a community of living organisms interacting with one another and with non-living organisms.
A habitat is the natural environment in which an organism lives.
A species consists of a group of organisms that look alike and have similar characteristics, share the same ecological niche and are capable of interbreeding.
A population consists of organisms living in the same habitat at the same time.
A community is a natural collection of plant and animal species living within a defined area or habitat in an ecosystem.
The function of an organism or the role it plays in an ecosystem is known as the ecological niche.