Several species of extinct dinosaurs independently evolved large, elaborate, sail-like structures on their backs. Examples include Spinosaurus, Ouranosaurus and Oxalaia.
Several other extinct animals (belonging to the Synapsid group rather than the Dinosaur clade) also had very prominent 'sails'. Examples :Edaphosaurus , Dimetrodon and Secodontosaurus
The function of the 'sails' has been investigated since the first days of their discovery.
Theories include :
The explanations, which are not mutually exclusive, remain highly debated.
Note: Several modern-day lizards and amphibians have sail-like structures - though generally much less prominent than the dinosaurs. See list at Wikipedia