The first step is understanding how our mind perceives 3D, or to put it simply 'depth'. Each of our eyes sees a slightly different image and the brain puts these together to form a 3D image. If you close one eye you are technically seeing 2D however, your brain assumes so many things that it doesnt make much of a difference. But if you hold up something close to your face and then look at it with one eye in turn you will notice a huge difference in the image.
So this is simple. All that needs to be done is to fool the brain into thinking that it is getting two images and let it put them together to form a 3D image. Animated 3D movies are made normally but when they render them they make two movies from two different carefully placed cameras that represent each of the viewers eyes. When shown in cinemas both the recorded movies are projected onto a special screen using two projectors. The projectors project perpendicularly polarized light with respect to each other and the screen maintains this polarization. All that is needed are simple 3D glasses with polarized frames that make sure that the image made from the right camera coming from the right projector goes into our right eye and the light from the left projector goes into the left eye and our brain puts it all together to give us stereoscopic 3D vision of a 2D screen!
Magic, no. Physics, yes!