Habitat is the place in nature where a species lives.
For example, the habitat of the royal victory plant is the lakes and wetlands of the Amazon, while the panda's habitat is the bamboo forests of the mountainous regions of China and Vietnam.
The niche is a set of conditions under which the individual (or a population) lives and reproduces. It can also be said that the niche is the "lifestyle" of an organism in nature. And this way of life includes both physical factors - such as humidity, temperature, etc. - as well as biological factors - such as food and the beings who feed on that individual.
Let's explain further: Howler's niche, for example, includes what he eats, the beings that feed on him, the organisms that live together or near him, and so on. In the case of a plant, the niche includes the mineral salts that it extracts from the soil, the part of the soil from which it comes, the relationship with other species, and so on.
The niche also shows how species exploit environmental resources. Thus the zebra, found in the savannas of Africa, eats the undergrowth, while the giraffe, living in the same habitat, eats the leaves of the trees. Note that each species exploits the resources of the environment a little differently.
Individuals of the same species living in a particular region make up a population. For example: the jaguars of the wetland form a population.
Capybaras can also be found in the Pantanal, but they are part of another population, since they are of another species.
Sometimes the population can increase greatly, for example, in the mid-nineteenth century, some wild rabbits were taken from England to Australia for hunting purposes. In Europe, rabbit populations were naturally controlled by various predators and parasites. In Australia, however, there were not so many species that attacked rabbits. As a result, this animal reproduced rapidly, reaching more than 200 million individuals, which destroyed Australia's crops and pastures. This shows the danger of introducing a non-native organism into a new environment.
This is one more question that ecology studies: "What makes the number of individuals in a population increase, decrease, or remain constant?"