Earthquakes occur along fault lines when built-up stress in rocks is suddenly released. They can happen at plate boundaries where plates converge, diverge, or move past each other. The type and extent of damage from earthquakes depends on factors like the depth of the focus, distance from the epicenter, underlying soil and preparedness of people in the affected area. Some choose to remain in quake-prone regions due to acceptance of risks or ability to adapt infrastructure. Major historical quakes include those in Sumatra, Japan, Sri Lanka, and San Francisco.