A "Discord tag" is the combination of a username and their discriminator (a 4-digit number). The tag always appears as
The discriminator is used by Discord to distinguish multiple users that share the same name.
Each user gets a random discriminator assigned that can range from 0001 up to 9999. The number 0000 is only used by webhooks and Clyde respectively.
When all discriminators for a specific username are taken can no new account with the same name be created.
Changing your Discriminator is possible by having a Discord Nitro / Discord Nitro Classic subscription, or being a Discord Partner. This allows one to set your Discord tag to any number between 0001 and 9999, provided it isn't already taken, and is limited to 5 changes per hour. If a user's Nitro subscription expires, their Discriminator will be randomly reset to a different number, but only if the advantage of the perk is taken.