Ecological niche - the role that an organism plays in its habitat e.g. seed dispersal, food web, pollination, habitat provision.
In a single habitat, two species cannot occupy exactly the same niche. One will outcompete the other causing them to migrate away or go extinct in that area.
Niche differentiation - some species change their niche so they can sty in the same habitat e.g. warblers:
If one species is in a tree, it will feed on the whole tree. However if there are three species in one tree, they will stay in separate levels of the tree to feed.