How does the flag and flag capture zone work?

I’m confused about how it works.

The flag is a capturable item for CTF game modes.
The capture zone is the range a player needs to be in to capture a flag.