Many times sound effects in film are created by Foley Artists who use different objects and animals to create sounds that the camera can not capture.
Some examples of this include the dinosaurs in Jurassic Park, the sound of flipping pages and even the sound of walking in snow.
Here are 2 examples of how they got the dinosaurs roars:
Velociraptors – Tutorise
Tyrannosaurus rex – The key element of the T. rex roar is not a full-grown elephant but a baby elephant.