A Dinosaur is a Diapsid.

A Diapsid is a creature that has two holes behind the eye socket in the the skull; one above the other.

Dinosaurs share this feature with a number of other modern reptiles including crocodiles, snakes, birds and lizards.

Other prehistoric diapsids included pterosaurs, plesiosaurs and mosasaurs.

The top hole is called the Upper Fenestra (opening) and the bottom hole is called the Lower Fenestra. These openings are used for the attachment of muscles. They also lighten the skull.
Mammals only have the Lower Fenestra. In humans this is where the ear is. 
In a tyrannosaurus skull the two holes merge to look like one big hole
  Tell the Time The Earth, the Sun and teh Moon