Every species has a fundamental niche, the ideal set of environmental conditions it can potentially occupy without competition or predation. However, due to species interactions, most organisms live within their realized niche, a subset of the fundamental niche where they can maintain a stable species population.
For instance, two closely related species might have a niche overlap where they require the same resources. But due to interspecific competition between two species in the same niche, one species might dominate, pushing the other into a slightly different niche space.