The Castle Rock and Arthur's Seat are the remains of lava streams that hardened after the two volcanoes around them became dormant and cold.
The Castle Rock is where lava flowed.