In the early solar system, distribution of volatiles such as water, carbon dioxide, methane, and ammonia was determined by the radial temperature gradient produced by solar radiation, resulting in the ultimate formation of small, volatile-poor terrestrial-type planets in the inner solar system and massive, volatile-rich gas giants in the outer solar system. Any volatiles present above the surfaces of the terrestrial planets (Mercury, Venus, Earth, and Mars) are the result of outgassing from their interiors. During more than five decades of studying the planets of the inner solar system by increasingly more sophisticated spacecraft, much has been learned about the past and present inventories of volatiles at various planets and about the physical processes responsible for volatile losses. We now know from observations at Venus and Mars that both planets had oceans for extended periods of up to perhaps a billion years. This paper reviews what has been learned from spacecraft missions about the initial volatile inventories (especially water) at Venus and Mars in comparison with the Earth, and delineates the processes discovered to be responsible for volatile losses at these planets. In particular, planetary magnetic fields are shown to be important in preventing volatile loss by shielding planetary exospheres from the solar wind.