The first viewer for stereoscopic images was invented by Sir Charles Wheatstone in 1833, when photography was not invented yet (first daguerreotypes appeared in 1837). From 1859 the industrial production of stereoscopes began to develop on the standard created by O.W. Holmes, similar to the one presented on the right.
This device was very common in most of the middle class families until the first two decades of the 20th century.
The Stereoscopic photos are obtained by means of a camera with double lens. Double photos are taken from a slightly different point of view which corresponds to the distance between the eyes. When the two pictures are observed through the lens of the stereoscope, the eyes mix the two images so to have a 3d effect.
Brewster style stereoscope (XIX sec.)
A nice graphoscope Souvenir de Paris. This kind of viewer let you see both pictures magnified by a powerful lens and stereoscopic photos through the smaller lens further down. When folded up this graphoscope is cm. 28x17.
Stereoscope Keystone, USA (1904).
Stereoscope Idealoscope made by Richard, France (XX sec.).