When atoms and molecules emit or absorb light, they do so at specific wavelengths of light. When we look at the spectrum of an object, we can deduce what different kinds of atoms or molecules are in that object, and the physical conditions and environments that those atoms or molecules are in. Careful spectroscopic study can help us learn about such characteristics as composition, density, temperature, magnetic field strength, and structure. Furthermore, by measuring the Doppler shift of the emission and absorption features in the spectra, we can also deduce how the object is moving; how the different components of the object are moving compared with one another; and, in the case of distant galaxies or quasars, their cosmological redshift can tell us how far away they are and how old they are.