Light is an electromagnetic field: a wave-on-a-rope type thing except the rope is space. An electromagnetic field exerts a force on charged objects like electron, protons or even entire atoms and molecules. If you put an electron and shoot polarized light at it, it's movement will be consistent with the electric field going up and down in a particular plane. Analogously for unpolarized light.
A thin slit cause polarization the same way only one plane of oscillation is possible for a rope passing through a slit. Except what is stopping the oscillations in 'bad' directions is the interaction between the electromagnetic field and atoms that make up the boundaries of the slit.
Thanks! After reading this [0] I'm surprised that my high school recollection seems to be how it really works. It still seems very strange. One thing in that article bothers me though: it talks about the wave itself as vibrating, e.g. "A light wave that is vibrating in more than one plane is referred to as unpolarized light." But how does a wave vibrate? It seems like a sloppy use of language. Using your own words maybe it's more correct to say that space is vibrating? Or rather vibration is just a metaphor for the EM field?
The "length" of the photon is very short. There is not a long wave like you are thinking, like a wave on a string.
Take a short string and pull it over a sine wave. At any instant in time, one part of the string will be high, another part low. As you pull it, the position changes, but the sun total of all the "heights" in the sine wave is always the same, no matter what part of the sine wave you start at.
So you can think of a photon like that: As it snakes it's way through space, it doesn't actually move up and down, but rather as it progresses the front of it will sometimes be "high" and sometimes "low".
Take a hose and wave it in the air, to make a sine wave of water. Now think of each molecule of water - every single molecule only moves forward in a perfectly straight line! None of them move side of side. Yet it looks that way, but it's really new molecules, some of them are moving here and some there.
A thin slit cause polarization the same way only one plane of oscillation is possible for a rope passing through a slit. Except what is stopping the oscillations in 'bad' directions is the interaction between the electromagnetic field and atoms that make up the boundaries of the slit.