Applications of Monte Carlo methods to statistical physics