Every living organism needs a home, shelter or environment that provides the safety, ideal temperature and basic things it needs to survive.
One important function of the organism's home (habitat or environment) is to provide the ideal temperature in which the organism can thrive.
Humans have a way of helping themselves if it gets too cold or too hot. But this is not so for every living thing. If it is too cold or too hot, some plants will struggle to survive.
This is same for animals too. An ideal temperature is very important. Extreme temperature can wipe out an entire ecosystem.
Temperature is affected by water, air, soil and sunlight.
Temperatures are not the same everywhere on earth. Some places such as the north and south poles are very cold (–88°C or -126.4°F). Other places, especially in the tropics can get very warm (up to about 50°C or 122°F). Animals that are adapted to cold temperatures cannot survive in warm temperatures.
Some places are just too cold for plants to survive. These include high mountain peaks such as those in the mountains of British Columbia.
Think of the brook trout — it prefers water temperatures between 4°C or 39.2°F and 20°C or 68°F and will only lay eggs when the water temperature is below 13°C. Animals like polar bears and penguins are adapted to thrive only in extremely cold climates. They will not survive if they end up in a hot, dry tropical climate.
Metabolic and enzyme activities in animals require the right temperatures to happen, otherwise, such processes slow down and affect that living organism.
Some fishes also thrive only in the shallow warm waters of tropical seas, where temperatures are warm all year through.