The purpose of this report is to study the dynamics of rigid blocks subjected to an earthquake ground motion. Such study could predict whether a rigid body overturns or remains standing. In particular, three cases are analysed in detail. Firstly, we deal with the one body case, for which it is studied the phase space when there is and when there is not a perturbation acting on the system. In particular, some numerical computations are carried out in order to find periodic orbits making use of the Poincaré impact map. Another special case of piecewise smooth systems is analyzed, a nonlinear impact oscillator. Finally, the one body case is extended to two blocks rocking. The purpose of this study is to look for some periodic orbits in order to know whether the motion of the blocks synchronizes.