Well, imagine the universe is a 2-dimensional plane in 3-d space. If you add a little 3-d curvature to the plane, like bending a sheet of paper, then eventually, if the plane is big enough, it must curve around until the opposite edges meet somewhere. There’s your “closed loop”.
Same principle would apply to our 3-d universe if it is curved in the 4th dimension.
Then imagine where the 4th dimension is.