Buildings respond differently to earthquakes based on their mass, stiffness, natural period, and proximity to other structures. Taller buildings have longer natural periods than shorter buildings, so they are more affected by ground motions matching their natural frequency. Building damage depends on factors like shape, materials, height, connections, and whether the earthquake shaking matches the building's natural period. Retrofitting techniques like base isolation help buildings withstand quakes by reducing transmitted ground accelerations.