A door is a panel or barrier, usually hinged or sliding, that is used to cover an opening in a wall or partition going into a building or space. A door can be opened to give access and closed more or less securely. The term door is also applied to the opening itself, more properly known as the doorway.
Doors are nearly universal in buildings of all kinds, even crypts or caverns where people normally wouldn't be there, allowing passage between the inside and outside, and between internal rooms. When open, they admit ventilation and light, but also allow any hostiles to see you.