Squawk codes are four-digit codes that are used for communication between the aircraft during flight and the air traffic control (ATC) personnel. The code consists of four digits between 0 and 7. Unique codes allow pilots and controllers to establish efficient communication during various situations related to aircraft safety, the environment, and others. Squawk codes can be changed mid-flight depending on the circumstances.