The Physics of CMB Anisotropies
In the early universe, conditions were hot enough that the rate at which photons scattered off free electrons was large in comparison to the expansion rate of the universe. Thus the electrons and photons were in thermal equilibrium. Once the universe had cooled sufficiently to allow decoupling between the photons and electrons, the mean free path of the photons became much larger than the event horizon of the universe. There is, therefore, a surface at which the last photon scattering occurs before the recombination of electrons with nuclei to form atoms (recombination is of course a misnomer, but it is the standard term used in the literature). This surface is expanding with time, is located at a redshift of around z ~ 1000 and has essentially a radius of the observable universe. It is known as the surface of last scattering. It is here that the polarization of the CMB radiation occurs. Looking out into space and so backwards in time, this surface forms a boundary between the opaque and the transparent universe. In the thin scattering surface approximation assumed by most models, it is assumed that the recombination occurs instantaneously following the breakdown of tight coupling. Although this is a useful approximation, in reality instantaneous recombination would prevent polarization taking place. So perhaps a “shell” of last scattering would be a better description. There is also a second, later scattering event at redshift z ~ 10 associated with reionization.
There is now a general consensus that the CMB radiation originates from a period roughly 400,000 years after the Big Bang. The CMB radiation provides a characterisation of conditions in the universe just prior to recombination when the universe was a lot simpler and hence easier to model. The radiation has since cooled with the expansion of the universe and now the CMB has a blackbody spectrum at a temperature of 2.728 ± 0.004K.
The CMB temperature is not exactly the same in all directions - there are small fluctuations in its intensity across the sky. The largest anisotropy is the dipole arising from the motion of the Earth with respect to the CMB. This arises as the Milky Way moves through space, relative to the CMB. The dipole anisotropy is itself modified as the Earth moves around the Sun. After this dipole is removed from an analysis, the remaining fluctuations are at the level of about one part in 100,000. These fluctuations are due to relic inhomogeneities in the primordial plasma. This gives us interesting information about the early universe.
Photons in the plasma are influenced by density and other perturbations to the space-time metric. To express this in a more quantitative way, we consider first order perturbations to the Friedmann/Robertson-Walker metric tensor.
In all presently known working models of cosmic structure formation, initial conditions come from an early inflationary phase of the universe. The simplest models of inflation do indeed lead to adiabatic perturbations. However, string cosmology models predict isocurvature perturbations or a mixture of isocurvature and adiabatic perturbations
Apart from the adiabatic mode, one can show that perturbations can have a baryon isocurvature mode, a cold dark matter isocurvature mode, a neutrino isocurvature density mode, and a neutrino isocurvature velocity mode.
The cosmic microwave background and large-scale structure data can be used to constrain cosmological models where the primordial perturbations have both an adiabatic and a cold dark matter (CDM) isocurvature component.
Entropy perturbations seed curvature perturbations outside the horizon so it is possible that a significant component of the observed adiabatic mode could be maximally correlated with an isocurvature mode. Such models are generically called curvaton models. In the curvaton model of inflation, a second scalar field, the "curvaton", is responsible for the observed inhomogeneity.

This simulation shows the circular patterns gravitational waves as long as the Universe leave in the polarization of the cosmic microwave background.
Authors: D. Baskaran, L. P. Grishchuk, A. G. Polnarev
Secondary Anisotropies
The Sunyaev Zel'dovich (SZ) effect is a secondary anisotropy due to the upscattering of CMB photons by electrons in the hot gas at the centre of galaxy clusters.
In principle, the SZ effect can also be observed in galaxies, though at a much lower level due to the cooler (1 keV) temperature of the gas.
As we look back there is a scattering event at redshift z ~ 10 associated with reionization. This occurred when the first few generations of stars and quasars emitted radiation that reionized the inter galactic medium, making it once again an ionized plasma, roughly 150 million to one billion years after the Big Bang. The different types of stars and the quasars likely caused reionization at different times, resulting in the so called reionization history. The various models of reionization can be constrained using CMB temperature and polarization data.