Space suit
A space suit is a garment worn to keep an astronaut
An astronaut or cosmonaut is a person trained by a human spaceflight program to command, pilot, or serve as a crew member of a spacecraft....

 alive in the harsh environment (vacuum
In everyday usage, vacuum is a volume of space that is essentially empty of matter, such that its gaseous pressure is much less than atmospheric pressure. The word comes from the Latin term for "empty". A perfect vacuum would be one with no particles in it at all, which is impossible to achieve in...

 and temperature extremes) of outer space
Outer space
Outer space is the void that exists between celestial bodies, including the Earth. It is not completely empty, but consists of a hard vacuum containing a low density of particles: predominantly a plasma of hydrogen and helium, as well as electromagnetic radiation, magnetic fields, and neutrinos....

. Space suits are often worn inside spacecraft
A spacecraft or spaceship is a craft or machine designed for spaceflight. Spacecraft are used for a variety of purposes, including communications, earth observation, meteorology, navigation, planetary exploration and transportation of humans and cargo....

 as a safety precaution in case of loss of cabin pressure, and are necessary for extra-vehicular activity
Extra-vehicular activity
Extra-vehicular activity is work done by an astronaut away from the Earth, and outside of a spacecraft. The term most commonly applies to an EVA made outside a craft orbiting Earth , but also applies to an EVA made on the surface of the Moon...

 (EVA), work done outside spacecraft. Space suits have been worn for such work in Earth orbit, on the surface of the Moon
The Moon is Earth's only known natural satellite,There are a number of near-Earth asteroids including 3753 Cruithne that are co-orbital with Earth: their orbits bring them close to Earth for periods of time but then alter in the long term . These are quasi-satellites and not true moons. For more...

, and en route back to Earth from the Moon.