In today's aircraft, the passenger oxygen masks are armed to automatically deploy if the cabin pressure exceeds a certain threshold (about 14,000 ft). So, in a depressurization event, when the cabin altitude goes above the threshold, the masks fall from their compartments.