Which of the following statements best describes the formation of volcanoes?