An ecological niche is the role and the position a species has within an ecosystem.
A niche is more than just the species' environment. A niche is made up of the species' habitat, place in the food web, how the species alters and is altered by its environment and other members of the ecosystem. A description of an animal's niche made include the temperature at which it can survive, the amount and type of food it consumes, the predators it has, whether it is active during the night or day, what competitors it has, and so forth.
A niche is a specific role of an organism in an ecosystem. Each organism affects the ecosystem in a way or another, and the total of these effects is what makes the whole ecosystem functioning properly as these roles depend on each other. Losing one niche will affect for sure the others and hence the whole ecosystem negatively.
One example is a primate called the aye-aye. Found only on the island of Madagascar, it's niche is actually very similar to a woodpecker's because this primate uses it's long middle finger to tap on trees and listen for larvae underneath. It then uses that middle finger to dig out the larvae and consumes them. It is active at night and is arboreal. The fossa, birds of prey, and snakes may eat aye-ayes.
The niche of a polar bear is very specialized. These arctic dwellers have no natural predators. Polar bears are carnivores and catch seals. The majority of seals caught are not on water nor land but at the interface of the two (or water and ice). Polar bears spend a majority of their time in the water. Given that polar bears obviously cannot swim forever, thus they require ice to periodically rest from time spent traveling and hunting. Polar bear cubs are raised in snow dens, thus these animals also require snow in order to raise their young.