In computer security Capture the Flag (CTF), "flags" are secrets hidden in purposefully-vulnerable programs or websites.
Competitors steal flags either from other competitors (attack/defense-style CTFs) or from the organizers (jeopardy-style challenges)
.
Several variations exist, including hiding flags in hardware devices.

Security CTFs are usually designed to serve as an educational exercise to give participants experience in securing a machine, as well as conducting and reacting to the sort of attacks found in the real world (i.e., bug bounty programs in professional settings).
Classic activities include reverse-engineering, network sniffing, protocol analysis, system administration, programming, cryptoanalysis, writing exploits, ...
In an attack/defense style competition, each team is given a machine (or a small network) to defend -- typically on an isolated competition network.
Teams are scored on both their success in defending their assigned machine(s) and on their success in attacking the other team's machines.
A variation from classic flag-stealing is to "plant" own flags on opponent's machines.

Prominent attack/defense CTF's include DEF CON's, often considered the "finals" of the competition circuit and held since 1996 at the largest hacker conference, and the NYU-CSAW (Cyber Security Awareness Week), the largest student cyber-security contest.

Hardware challenges usually involve getting an unknown piece of hardware and having to figure out how to bypass part of the security measures, e.g. using debugging ports or using a Side-channel attack.

Jeopardy-style competitions are closer to programming competitions: teams do not directly attack each other, but rather solve challenges posed by the organizers.
Time is generally not be a factor in scoring these competitions, but "first blood" bonus points are often given to the first solver.

In King of the Hill-style challenges, players gain points by relative ranking.
Classically, only the top team gains points.
When another team bests the current champion (e.g., by gaining access to the shared "target" machine that the champion was defending), they become the new champions and shift to defending their own position against others.
In computer security Capture the Flag (CTF), "flags" are secrets hidden in purposefully-vulnerable programs or websites. Competitors steal flags either from other competitors (attack/defense-style CTFs) or from the organizers (jeopardy-style challenges)
. Several variations exist, including hiding flags in hardware devices.
Security CTFs are usually designed to serve as an educational exercise to give participants experience in securing a machine, as well as conducting and reacting to the sort of attacks found in the real world (i.e., bug bounty programs in professional settings). Classic activities include reverse-engineering, network sniffing, protocol analysis, system administration, programming, cryptoanalysis, writing exploits, ...
In an attack/defense style competition, each team is given a machine (or a small network) to defend -- typically on an isolated competition network. Teams are scored on both their success in defending their assigned machine(s) and on their success in attacking the other team's machines. A variation from classic flag-stealing is to "plant" own flags on opponent's machines.
Prominent attack/defense CTF's include DEF CON's, often considered the "finals" of the competition circuit and held since 1996 at the largest hacker conference, and the NYU-CSAW (Cyber Security Awareness Week), the largest student cyber-security contest.
Hardware challenges usually involve getting an unknown piece of hardware and having to figure out how to bypass part of the security measures, e.g. using debugging ports or using a Side-channel attack.
Jeopardy-style competitions are closer to programming competitions: teams do not directly attack each other, but rather solve challenges posed by the organizers. Time is generally not be a factor in scoring these competitions, but "first blood" bonus points are often given to the first solver.
In King of the Hill-style challenges, players gain points by relative ranking. Classically, only the top team gains points. When another team bests the current champion (e.g., by gaining access to the shared "target" machine that the champion was defending), they become the new champions and shift to defending their own position against others.
Capture the flag