Earthquakes occur when tectonic plates shift beneath the Earth's surface, causing the ground to shake and sometimes displace. Large offshore earthquakes can displace the seabed enough to create tsunamis. Earthquakes may also trigger landslides or volcanic eruptions in rare cases. Volcanic eruptions happen when gas and magma build up underground, releasing lava, rocks, and ash during more explosive eruptions. Eruptions with less gas and thicker magma tend to be less dramatic and result in lava flows from the vent.