Volcanoes form as molten rock, known as magma, rises from below the Earth's crust and erupts at the surface. The composition and viscosity of the magma determines the type of eruption, from gentle to violent explosive eruptions. During an eruption, molten rock (lava), rock fragments of varying sizes, and volcanic gases are ejected from the volcano. The largest rock fragments fall closest to the volcano, while very fine ash can travel much farther and remain suspended in the air for long periods of time. Most volcanic activity occurs at plate boundaries in the oceans, but some volcanoes form independently at hotspots in the crust.