Earthquakes can occur in various locations, including at the edge of tectonic plates, in the ocean, and near volcanoes. However, earthquakes are not limited to only these areas. They can also occur in the middle of tectonic plates, known as intraplate earthquakes.