How does a magnetic field affect electronic spin? As I understand it, in the Einstein-de Haas experiment we apply a magnetic field to a ferromagnetic material and the spin of its electrons align with the magnetic field, producing a magnetic dipole.
But in the Stern-Gerlach experiment, spin isn't affected by the magnetic field, otherwise the beam of atoms wouldn't split in two. If the electrons in the E-dH experiment behaved the same way, there wouldn't be a macroscopic dipole.
I'm probably misunderstanding how one of these experiments work, but in case I'm not: why does spin act differently in these two experiments?
 A: In both cases, the magnetic field doesn't change the electron spin. The difference is in the fact that the electrons in the Einstein-de Haas experiment are part of a lattice, and the ones in the Stern-Gerlach experiment are not.
In the Stern-Gerlach experiment, the electrons in the beam are effectively isolated, meaning that whatever spin state they had when they were put into the beam stays that way. The magnetic field gradient doesn't change the spin direction, it just exerts force in whatever direction the spin dictates.
In the Einstein-de Haas experiment, the electrons are part of a lattice with tons of other electrons at a non-zero temperature. Therefore, due to lattice interactions, the spin of each electron is constantly fluctuating, regardless of the presence of a magnetic field. In the absence of a magnetic field, there is an equal probability of detecting the electron in any spin configuration. An applied magnetic field makes some spin configurations (namely, those parallel to the field direction) lower energy than others, so it shifts the probability distribution toward the direction parallel to the field*. The stronger the applied field, the more heavily the distribution is weighted in that direction. So the magnetic field doesn't really change the direction of the spin, it just changes how much time the fluctuating spin spends in a particular configuration.
*In some cases (see antiferromagnetism), interactions between adjacent electrons can be more important than an external field, and lead to unusual effective potentials that make for weird spin arrangements. Typically things happen as above, though. 
A: A spin generates a magnetic moment $\mu$ which can be translated and rotated by a magnetic field $\textbf{B}$ (you can think of it classically), with:
$$F=\nabla(\mu\cdot\textbf{B})$$ and $$T=\mu\times\textbf{B}$$
where $F$ is the force and $T$ the torque acting on the moment.
In the Stern-Gerlach experiment the beam does split in as many sub-beams as the possible projections of the spin (2, if s=1/2), unless a previous measurement set all the projections to the same value.

A: I suppose that this is due to the fact that in the ferromagnetic case the electrons are not free to move. They are part of the metallic grid and in bound state wrt the nucleus. Therefore their only chance of reaction is to flip the spin (and stay bound).
