A NPC Flag designates the home of the NPC shown on the flag. It is only visible while housing interface is active. These flags can be placed out of the housing menu into any suitable home. Right-clicking the flag in the home will remove the flag, allowing you to reassign housing without an empty home. If the home is temporarily made unsuitable, the flag will not necessarily disappear. However, if the home is destroyed, the flag will find a nearby suitable home or disappear. At night, the NPC will stand at the location of their NPC flag within the home.
NPCs that move in on their own will have a regular red flag. On the Desktop version, if the player assigns them to a home, the banner will have a golden frame. This indicates that if the NPC currently inhabiting the home were to die, the replacement for that NPC would move into that specified home. Due to this, a golden NPC flag will not disappear unless the home it is in is destroyed or the NPC is reassigned.