Dinosaurs came in two kinds: plant-eaters and meat-eaters.
The plant-eaters tended to be very large because the poor food they ate needed a lot of digesting, and a big body is useful for that. Meat-eaters did not have the same problem, and they are not as big.
Many dinosaurs (except the very largest) had to defend themselves and for this they had all kinds of bony plates on their heads.
Dinosaurs died out because they could not adapt to a great climate catastrophe.