A Bulkhead Door is a door designed to withstand the pressure difference between the fully-pressurized interior of the ship and the vacuum of space. Any area which might normally be exposed to vacuum must have a bulkhead door, as ordinary doors just aren't equipped to withstand the pressure differential. Bulkhead doors are bigger and sturdier than ordinary mid-ships doors.
An airlock is comprised of a small space between two bulkhead doors. Normally, both doors are closed. When entering the ship, air is pumped out of the airlock, and the outer door is opened to admit the individual; when that person is inside the small space, the outer door is closed, air pressure is restored to the airlock, and only then can the inner door be opened safely.
When exiting the ship, the inner door is opened, and the traveller enters the airlock. The inner door is closed, air is pumped out of the airlock, and only then can the outer door be opened safely.