This applet illustrates the concept of ergodicity.
Simulations of two systems are conducted simultaneously. Both systems are at the same volume and energy. Each simulation is conducted for a system of hard disks tightly packed into a confined space.
In principle, both simulations are sampling the same ensemble of configurations. However, it is clear that in practice each samples only a subset of all possible configurations. In each phase, the average placement of the atoms zig-zags between the top and bottom of the cell. But in one phase the first (red) atom lies at the top, and in the other it lies at the bottom. It should be pretty clear from observation of the dynamics that each will never sample the configurations seen by the other. Thus, each simulation is not ergodic.
As set up, it might be possible for either simulation to switch to the other arrangement; note that the red atom does occasionally sample both top and bottom of its cell. It may just be extremely unlikely that all the atoms will conduct the concerted sequence of motions needed to make the switch. Maybe if you watch long enough you'll find out!