Some of the most important geometric integrators for both ordinary and partial differential equations are reviewed and illustrated with examples in mechanics. The class of Hamiltonian differential systems is recalled and its symplectic structure is highlighted. The associated natural geometric integrators, known as symplectic integrators, are then presented. In particular, their ability to numerically reproduce first integrals with a bounded error over a long time interval is shown. The extension to partial differential Hamiltonian systems and to multisymplectic integrators is presented afterwards. Next, the class of Lagrangian systems is described. It is highlighted that the variational structure carries both the dynamics (Euler-Lagrange equations) and the conservation laws (Noether's theorem). Integrators preserving the variational structure are constructed by mimicking the calculus of variation at the discrete level. We show that this approach leads to numerical schemes which preserve exactly the energy of the system. After that, the Lie group of local symmetries of partial differential equations is recalled. A construction of Lie-symmetry-preserving numerical scheme is then exposed. This is done via the moving frame method. Applications to Burgers equation are shown. The last part is devoted to the Discrete Exterior Calculus, which is a structure-preserving integrator based on differential geometry and exterior calculus. The efficiency of the approach is demonstrated on fluid flow problems with a passive scalar advection.