Many aircraft are not pressurized and therefore not airtight. The occupants would suffocate, if nothing else, and most unpressurized aircraft do not regularly operate at altitudes requiring pressurization.
In the case of pressurized aircraft, it's actually necessary that the cabin is not airtight. They are, instead, nearly airtight and can withstand significant pressure differentials.
Cabin pressurization works by bleeding high-pressure air from the engines, which is then run through packs (heat exchangers and air cycle machines) to cool it. After conditioning, the air is fed into the cabin. This is what creates the higherlower cabin altitude relative to the outside atmosphere.
Because more air is constantly being added to the fuselage, a pressure outflow valve is required and it is constantly dumping air from inside the aircraft. In normal operations, it's automatically controlled, but can be manually overridden in emergency situations.