Why do you have a volcano?

The Earth has volcanoes as a method of cooling itself off. These volcanoes act as vents that release molten material and hot air.