Old red sandstone formed 400 million years ago under a shallow sea, then about 325 million years ago volcanoes erupted. When they cooled they formed the hard igneous rock which is Easter Craiglockhart Hill. You can see this rock as lava outcrops.
The softer green coloured rock on the edge of the hill is volcanic tuff which is volcanic ash, expelled when the volcano erupted. Later, earthquakes caused the rock to split leaving steep sided cliffs. Then 17,000 years ago a huge sheet of ice covered the area. When it melted the valleys were cut leaving the hills you see today.