The anisotropies in the CMB are caused by four effects; three at the surface of last scattering (SoLS), and one after:
- Temperature differences
- Denser regions will be more compressed and thus hotter, on average. Hence, an overdensity will result in a hotter spot, with a fractional fluctuation $\Delta T/T_0$.
- Gravitational redshift
- Photons climbing up (or falling down) the gravitational potential $\phi$ of their SoLS will lose (or gain) energy. Hence, an overdensity will result in a colder spot, and an underdensity in a hotter spot. This effect is also called the non-integrated Sachs-Wolfe effect and changes the temperature by $\Delta T = \phi/3c^2$, where $c$ is the speed of light.
- Doppler shift
- The SoLS has a bulk motion $\mathbf{v}$. Generally, overdensities have gas infalling, and hence result in a colder spot. In the direction $\hat{\mathbf{n}}$, the temperature difference will be $\Delta T = T_0 \mathbf{v}/c$.
- The integrated Sachs-Wolfe effect
- If a potential well is getting shallower in time (which happens during dark-energy domination), photons receive a net blueshift in crossing the well and the CMB appears hotter. This gives a temperature difference of $\Delta T = 2\Delta\phi/c^2$, where $\Delta\phi$ is the change in the potential while a photon traversed the potential well.
The total temperature fluctuation is the sum of all these terms. In general, the gravitational redshift will dominate over the temperature differences, which in turn dominates over the Doppler shift.
A review of the CMB fluctuations is given by Challinor (2013).