When an atomic cloud becomes denser and colder, the cooling effect described above becomes dominated by other processes, which cause heating. This includes energy release in collisions between atoms, and the random recoil kicks in light scattering, which average to zero, but still result in some trembling motion of the atoms and therefore limit the lowest achievable temperature. At this point, however, the atoms are cold enough that they can be confined by magnetic fields. We choose atomic species that have an unpaired electron and therefore a magnetic moment. As a result, these atoms behave like little bar magnets. External magnetic fields exert forces on them, levitate them against gravity and keep them together; the atoms are trapped in a magnetic cage with invisible walls formed by magnetic fields.
Further cooling is done by evaporative cooling, by selective removal of the most energetic atoms from the system. The same process cools a cup of coffee when the most energetic molecules escape as steam, thus lowering the average energy and therefore the temperature of the remaining molecules. In a magnetic trap, the most energetic atoms can move farther against the pull of the magnetic forces, and can therefore reach regions with higher magnetic fields than the colder atoms can. At those high magnetic fields, they get into resonance with radio waves or microwaves, which changes the magnetic moment in such a way that the atoms fly away and escape from the trap. Nice animations of the cooling procedure can be found at http://www.colorado.edu/physics/2000/bec/temperature.html
How do we measure very low temperatures of atoms? One way is to simply look at the extension of the cloud. The larger the cloud is, the more energetic the atoms must be, because they can move farther against the magnetic forces. This is similar to the atmosphere on Earth, which is about 10 kilometers thick. That is, 10 kilometers is how far atoms at room temperature can move against the gravitational force of our planet. If the temperature of the air were 10 times smaller (which is about 30 K or –240 degrees C), the atmosphere would be only one kilometer thick. At 30 microkelvins, the atmosphere would shrink to a mere millimeter, and at 30 nanokelvins, the height of the atmosphere would be one micron, or a hundred times less than the thickness of the human hair. (Of course, air is not an ideal gas and would have liquified by then.) In our experiments, the atoms are exposed to both magnetic and gravitational forces. In the center of the cloud, the gravitational force is exactly compensated by the magnetic force.
The size of the atomic cloud is determined by illuminating the cloud with laser light, which is strongly absorbed by the atoms, and they cast a shadow. With the help of several lenses, the shadow is imaged onto an electronic sensor similar to those in digital cameras. Because the magnetic fields are precisely known, the size of the cloud is an absolute measure of the atoms' energy and temperature. (More scientifically, the density distribution of the atoms reflects the distribution of potential energy.)
Another method to determine temperature is to measure the kinetic energy of the atoms. For that, the magnetic trap is suddenly switched off by switching off the current running through the magnet coils. In the absence of magnetic forces, the atoms simply fly away, and the cloud expands ballistically. The cloud size increases with time, and this increase is a direct observation of the velocity of the atoms and therefore their temperature. (More technically, an absorption image of an expanding cloud shows the distribution of the kinetic energy in the cloud.) For a fixed time of ballistic expansion, the size of the shadow is a measure of the temperature (temperature is proportional to the square of the size). The achievement of lower and lower temperature is monitored by a shrinking shadow. When Bose-Einstein condensation was discovered in 1995, its hallmark was that the shrinking shadow suddenly showed a dense core of atoms at extremely low energy, the Bose-Einstein condensate (see image).