An atmosphere is a layer of gas
Gas is one of the three classical states of matter . Near absolute zero, a substance exists as a solid. As heat is added to this substance it melts into a liquid at its melting point , boils into a gas at its boiling point, and if heated high enough would enter a plasma state in which the electrons...

es that may surround a material body of sufficient mass
Mass can be defined as a quantitive measure of the resistance an object has to change in its velocity.In physics, mass commonly refers to any of the following three properties of matter, which have been shown experimentally to be equivalent:...

, and that is held in place by the gravity of the body. An atmosphere may be retained for a longer duration, if the gravity is high and the atmosphere's temperature is low. Some planet
A planet is a celestial body orbiting a star or stellar remnant that is massive enough to be rounded by its own gravity, is not massive enough to cause thermonuclear fusion, and has cleared its neighbouring region of planetesimals.The term planet is ancient, with ties to history, science,...

s consist mainly of various gases, but only their outer layer is their atmosphere.

The term stellar atmosphere
Stellar atmosphere
The stellar atmosphere is the outer region of the volume of a star, lying above the stellar core, radiation zone and convection zone. It is divided into several regions of distinct character:...

 describes the outer region of a star, and typically includes the portion starting from the opaque photosphere
The photosphere of an astronomical object is the region from which externally received light originates. The term itself is derived from Ancient Greek roots, φῶς, φωτός/phos, photos meaning "light" and σφαῖρα/sphaira meaning "sphere", in reference to the fact that it is a spheric surface perceived...