This applet demonstrates the idea of periodic boundary conditions. Follow the red particle as it meanders about during this (molecular dynamics) simulation. Note how its exit from one side of the box occurs simultaneously with the entrance of its image on the opposite side.
If you click once on the button labeled "First shell", you can see the nearest set of neighboring images. With this view it becomes very clear how periodic boundaries work.
With the first image shell displayed, click on the center button, labeled "Hide boundaries", and you get a feel for how well the periodic system can mimic an infinite one. Use the rightmost button to make all the particles black to get the best effect. Even with this view, if you look carefully you can see the artificial correlations brought about by the periodic boundaries.
Click on each of the buttons again to toggle back to the original state.