The geological formation of the rock was formed when the African continent (or more specifically the tectonic plate on which it sits) crashed into Europe millions of years ago. It is believed that the straights of Gibraltar formed a barrier which turned the Mediterranean Sea into a lake, which after drying up was eventually flooded by the Atlantic Ocean, creating the situation which we observe today.
At the highest point the rock is 426 metres, with one sheer rock face and another gentle incline. Like all limestone formations, the rock is dissolved by rainwater and so there have been a number of caves created throughout Gibraltar. Most famously St. Michael's Cave, located halfway up the western slope of the Rock, which is a popular attraction for tourists.