Q1: What is the ergodicity and ergodicity breaking in a Monte Carlo simulation of a statistical physics problem?
Q2: How does one ensure that the ergodicity is maintained ?
To complete the answers already given, ergodicity in MC simulations is a practical problem and not a conceptual one contrary to the ergodicity property in physics. Normally, if you sample your phase space with a Markov chain, it is possible to show that whatever the initial trial distribution, your Markov chain will eventually sample the Gibbs distribution associated to the statistical ensemble you are interested in.
In practice however, your system can be trapped in local minima of the potential energy surface and be ergodic only within those minima (akin to what would really happen in a supercooled liquid). This is an obvious case of ergodicity breaking in the sense suggested by sebastian above.
This can be tested quite easily as your simulations will give different averages depending on the initial condition for instance.
In the context of a Monte Carlo (MC) simulation, ergodicity means that the algorithm that you use is designed in such a way that all points in the corresponding phase space (the one that contains the trajectory of your statistical ensemble) would be visited if the algorithm ran for an infinite amount of time. There is no way to prove that an algorithm is ergodic, as we just cannot let a simulation run infinitely. In the literature, you can find the concepts of balance and detailed balance. From a practitioner's point of view, if an algorithm fulfils detailed balance, it is safe to assume that the system behaves ergodic.
In general, you cannot show that a system is ergodic. In statistical physics, ergodicity is assumed for systems in thermal equilibrium, but this assumption cannot be proven (to my (limited) knowledge).
A good online resource for learning MC is this site with lecture notes. A good book that covers everything from the beginning is Tuckerman: Statistical Mechanics. A book that is more detailed on MC but requires solid knowledge in statistical physics is Frenkel & Smit: Understanding Molecular Simulation.