You set squawk 7500 if your aircraft is subjected to unlawful interference (hijack, bomb threat, sabotage threat, or crew incapacitation). This code is a discreet distress signal for law enforcement. If you are in this situation, set the code, remain calm, and do not announce it on the radio. Simply fly the routing and altitude requested by the person or persons who have taken control, and proceed to the nearest major aerodrome.
ATC will see the code, alert authorities, and coordinate your safe landing.