The electron, proton, as well as other particles, all have an intrinsic angular momentum, like a ball spinning on its own axis. If one measures the component of this angular momentum along any direction one finds . This intrinsic angular momentum is called spin 1/2. Classically, a spinning distribution of charge will have a magnetic moment. Quantum mechanical spinning particles also have magnetic moments associated with their spins.
In their experiment O. Stern and W. Gerlach measured the intrinsic spin angular momentum of silver atoms and found it to take only two discrete values, and commonly called "spin up" and "spin down". A schematic diagram of the Stern-Gerlach apparatus is shown on the right. The source emits a collimated beam of silver atoms directed between the poles of a magnet. The magnet produces an inhomogeneous field. As the atoms are neutral they do not experience a Lorentz force. However, due to their intrinsic magnetic moments the atoms are deflected by the inhomogeneous field. The field causes an actual separation in space of atoms with spin up and spin down. The following animation gives an impression of the motion of the silver atoms in a Stern-Gerlach device.