What is the significance of a squawk code?
The squawk code is assigned by Air Traffic Control to the aircraft and is used for radar identification purposes. It is a 4 digit octal number (each digit has a value in the range [0-7]).

The flight crew enters the assigned squawk code into the transponder control panel and the radar extracts the code using a Mode-A interrogation (or UF5 / UF21 interrogation in case of a Mode S radar/ transponder). 

The extracted squawk code can then be used to correlate the radar reply with an aircraft's flight plan. A number of squawk codes are reserved for generic purposes and emergencies. These codes are used in emergency, or when no flight plan correlation is needed. Some generic codes are:


1000 - Conspicuity code signalling the Flight Data Processing system to use Mode-S Aircraft ID for flight plan correlation. (Primarily in Europe)
1200 - Visual Flight Rules standard squawk code (USA &amp; Canada)
2000 - Used when entering a Secondary Surveillance Area and no code has yet been assigned. 
7000 - Visual Flight Rules standard squawk code (ICAO, USA &amp; Canada use
1200 instead)
7500 - Unlawful interference / hijack (ICAO, worldwide)
7600 - Radio communication lost (ICAO, worldwide)
7700 - General emergency (ICAO, worldwide)