What are the roles of flags in politics?

Many political and social movements use flags to get noticed, to attract more people, and to unify its members. The socialist movements use red flags to represent their cause. Anarchists use black flags to get attention.