Periodic boundary conditions are achieved by surrounding the simulation box with an infinite number of copies of itself! This is similar to the video game "Asteroids." In that game when the ship flew off of the edge of the screen in one direction, it would re-emerge on the opposite side of the screen still moving in the same direction. This is periodic boundary conditions, or sometimes called toroidal boundary conditions.
So when an atom moves past the edge of the simulation box, it reappears on the opposite side. What's more atoms on the edge of the box feel forces from atoms on the opposite edge of the box.