The electric field has to be at right angles to the travel, but so long as it is, any direction will do. Look along the travel and the field is free to swing along any line in the circle of the figure.
Light whose swing lies along one fixed line is called linearly polarized. The pair of arrows in the figure is that swing, running back and forth along its line.
This freedom belongs to transverse waves alone. A longitudinal wave can only swing along the travel, so there is no direction to choose. Polarization existing at all is evidence that light is transverse.
Sunlight and lamplight are the sum of countless atoms each emitting on its own. Every single emission has a definite direction of swing, but taken together every direction is present in equal measure.
That is unpolarized light. The left of the figure is unpolarized, the right linearly polarized. Both travel the same way at the same speed; the only difference is whether the swings line up.
The eye cannot sense the direction of the swing, so it cannot tell the two apart by looking. Telling them apart takes something like a polarizer.
A polarizer passes swings along one particular line, called its transmission axis. The vertical stripes in the figure stand for that direction.
Send unpolarized light through and what comes out is linearly polarized, swinging vertically. A swing that arrived at an angle is not simply rejected; its vertical component gets through.
About half the arriving brightness comes out. Every direction is present in equal measure, so averaged over all of them half survives. Rotating the polarizer changes nothing for unpolarized light, since half comes through at every angle.
Set the first polarizer vertical and the second horizontal, and nothing comes out the far side. That is the right of the figure.
After the first, the swing is vertical and nothing else. To a second polarizer that passes horizontal swings, there is no component left to pass. So nothing emerges. Both sheets being transparent and the light going out are not in conflict.
With an angle between the two, the brightness that gets through goes as , which is the Malus law. At the factor is zero, so only crossing them exactly puts the light out. A liquid crystal display works on this: between two polarizers it twists the direction of the swing electrically, setting the brightness pixel by pixel.