Banners are decorative furniture that can be placed on the under-side of blocks. There are four craftable Banners (red, green, blue, and yellow). There are also several that are found naturally placed in various biomes, or are dropped from enemies. Banners are just for decoration, thus have no real function.
Banners that drop from enemies are known as Monster Banners. Nearly every enemy in the game has a corresponding Monster Banner, which it has a 0.5% chance to drop upon defeat.
Faction Flags are Banners found in Dungeons. In post-Plantera worlds, the Faction Flags that are found hanging in a Dungeon area correspond to that background wall type (brick, slab, tile), both of which signify the types of enemies that will spawn there.