Endotherms produce their own heat; ectotherms rely on environmental heat. Most ectotherms are cold-blooded while most endotherms are warm-blooded, but there are exceptions. Mammals are endotherms, and reptiles and amphibians are ectotherms.
Ectotherms must absorb heat from their environment to maintain their body temperature, and the weather can have a profound effect on their behavior. However, they do not have to eat as much as their endotherm counterparts. Crocodiles and alligators, for example, can go weeks or months without eating, but they also remain inactive during most of the day and save their energy for eating, mating and protecting their territory. Endotherms, on the other hand, are able to produce far more energy but must eat regularly. Mammals tend to be more active than reptiles, but they must eat far more to survive.
Scientists are still not sure whether dinosaurs should be classified as endotherms or ectotherms. If dinosaurs were cold-blooded, they would have been far slower than many experts believe. If they were warm-blooded, they would have had to eat a tremendous amount of food. Many now believe that dinosaurs were neither true endotherms nor true ectotherms and had a unique metabolism. This may be why they died off while many reptiles and amphibians survived.