Dinosaurs evolved from other reptiles (socket-toothed archosaurs) during the Triassic period, over 230 million years ago. Dinosaurs evolved soon after the Permian extinction, which was the biggest mass extinction that ever occured on Earth. During this time (the Triassic period), the mammals also evolved.