Life evolved in the ocean, some 3.6 billion years ago, and, for most of its history on Earth, has been confined to the sea. Shelled marine life had evolved by 600 million years ago (MYA) and both sharks and bony fish appeared during the Devonian Period, some 375 MYA. The first land animals, millipede-like organisms, crawled ashore during the Silurian (420 MYA), giving rise to terrestrial insects and spiders over the next 100 million years. Amphibians diversified and reptiles evolved during the Carboniferous Period (350-270 MYA) and, by the Permian (270-225 MYA), mammal-like reptiles appeared.
All of the above animals are/were ectotherms: they have an internal body temperature that matches their surroundings (some sharks, fish and insects, able to generate heat in certain muscle groups, are better classified as heterotherms). Early in the Mesozoic (200 MYA), endotherms, initially represented by small dinosaurs and the earliest mammals, evolved; these Triassic creatures (joined by the first birds during the Jurassic) were able to regulate their internal temperature by controlling regional blood flow (to conserve or dissipate heat), by shivering, sweating (or panting) and by maintaining a high metabolic rate. The evolution of fur, feathers and subdermal fat provided additional insulation and improved heat conservation.
Endotherms, most of which are homeotherms (maintaining a stable core temperature), are less restricted by their environment, have colonized all regions of the globe and can remain active during all seasons. Man, of course, has little external insulation but had the intelligence to develop clothing, control fire and build shelters. Mammal hibernation adds a final twist to the story; more than a behavior to escape the cold, torpor is an active process, lowering the metabolic rate, producing hypothermia and conserving energy during periods of reduced food supply.