Slices with the red number belong to the left image; those with cyan are instead from the right image.
A transparent PET G sheet is then applied over the resulting image so that, due to its physical characteristics and to the different angle-shots, our eyes can see only one of the two images; through the tuning of some parameters (number of the distinct images, width of the slices, ..) it is possible, then, to have the left eyes looking only at the images with the red numbers and the right eyes only at those with the cyan numbers. And, what if, by chance, the two images are just a stereoscopic pair ? Well, congrats, from the plane sheet absolutely still (like a drawing) a wonderful three-dimensional picture will stand up and you'll understand how easy is to cheat our brain.
Obviously, we have simplified some aspects. For instance, the slices should be very narrow so that even hundred of them can fill a inch (2,54 cm): technically, we say the image is composed by x (number of slices) lpi (lines per inch).