Typically, the airplane pressurizes to counteract the drop in air pressure at high altitudes. However, oxygen masks provide redundancy. If anything happens to the pressurization system, or the plane experiences any difficulties while in flight, oxygen masks will deploy.