One of the most distinctive thing about a dinosaur is often its spines, plates, horns, crests and other bony features.
Some dinosaurs, like the hadrosaurs, had a bony crest of the top of their heads. Others, like Stegasaurus, had big plates down the back, and some, like Triceratops, had horns and a frill of bone on the head.
Each of these was probably important in a different way. Plates on the head were probably for display. Plates down the back may well have been for cooling. Horns were almost certainly for defence.