Monte Carlo simulation of the Ising model