This problem concerns the astronaut preparing a "space walk" (EVA=Extra Vehicular Activity). The pressure inside the space suit ranges from 300-400 hPa (depending on the type of the suit) because under normal pressure, the suit would be unmovable against the vacuum outside.
During diving, the same problem occurs with the return to the surface; under the increased pressure under water, additional nitrogen or other inert gasses are dissolved into the body by way of the air breathed. During the return to the surface (relief of pressure), the gas has to leave the body via the lung. The decompression stops known to divers have to be observed. In the case of astronauts, the elimination of nitrogen is achieved by preliminary oxygen respiration. No nitrogen is offered to the lung anymore, so the nitrogen gradually leaves the organism and the pressure can be lowered to the level of the space suit in one final step.