A niche is the functional role of a species in a community. It includes its habitat, feeding habits, reproductive behavior, what preys on it, waste products released, and all other aspects of its biology. For example, beavers live in the forests of our area. They cut down trees to build dams that form ponds. They eat plant.
Males establish territories that they defend.
They reproduce resulting in an increase in their numbers. They add nutrients to their ecosystem by excreting wastes, dying and from the decomposition of the trees they cut down. They act as a habitat for other species like the fleas and ticks that live on their bodies. This is not even a complete picture of the beaver's niche. Two different species cannot occupy the same niche at the same time.