How Monte Carlo Simulations Work