What's the difference between the meaning of "banner" and the meaning of "flag"?
While the two terms are sometimes interchangeable, I would say that the usage would differ depending on the shape and purpose of the item in question.
A flag would typically be square or slightly oblong, as with the national flags of most countries. A banner tends to be more elongated, for example as you might see hung across a street during a parade. Flags tend to be attached by one side to a pole, whereas banners are typically attached at both ends, either fixed or on two poles. Furthermore, flags usually carry representative symbols or colours (e.g., chequered flag), whereas banners generally carry written messages (e.g., Happy Birthday Joe!)
On this basis few English speakers would refer to, say, the Union Jack as a banner. Likewise, Happy Birthday Joe! would not be called a flag.
A banner can mean a flag in the sense that it's a symbolic representation of an entity, such as a military unit or a country.
A banner can also refer to a sign, in any shape or material, used to show a message or an advertisement either in a tangible form (such as an advertising banner for a café) or in an intangible form (such as an advertising banner for an online cosmetic shop embedded in a webpage).
A banner can also be employed figuratively to refer to a cause or purpose such as He gunned down the drug dealers under the banner of justice and law enforcement.
A flag also has specialized usage in computing that represents a binary true/false value.
Another common synonym of banner/flag is standard.