Fossils of dinosaurs have now been found on every continent, almost everywhere that rocks of Late Triassic, Jurassic, or Cretaceous rocks are exposed on the Earth's surface. Because dinosaurs were (and in the form of birds still are) such a diverse group or animals, they probably lived in nearly every terrestrial environment. Their fossils, be they bones, teeth, or footprints, have been found in Mesozoic rocks that are geologically interpreted to have been deposited in deserts, savannahs, forests, beaches, and swamps.
The world was quite different
Dinosaur fossils have even been discovered in Antarctica and North America, but could they really survive polar conditions? During most of the Mesozoic, the world was quite different than our modern world. The global climate was much warmer, and polar ice caps probably did not exist. Also, the continents were not as widely separated by large oceans as they are today. Nonetheless, studies of ancient geography indicate that some dinosaurs that lived in Alaska, Antarctica, and even Australia lived very near the Earth's poles. Even with the warmer climate, these dinosaurs would have experienced extensive periods of darkness, which would have drastically affected the food supply of herbivorous dinosaurs. Exactly how they adapted to these conditions, perhaps through hibernation or migration, remains a mystery because there is little scientific evidence that can be gathered to test these potential mechanisms.