Flags area a simple answer to a question, on/off or yes/no if you prefer.
Flags are used as markers, for instance as a new player you write a script to give a new player a starting kit.
When that kit is given the flag is set to off or yes then in future scripts you can check the status of this flag and write the script to act accordingly.
Another example would be to use a flag in a quest, goal met, turn flag on
Understand how powerful these little flags are now and how they can help with scripts?