Molecular Dynamics Simulations in Statistical Physics: Theory and Applications