Tags are typically applied via the editor; however, you can also apply tags via script. Any custom tag must be created via the Tags & Layers window before being applied to a game object.
Setting Tags in the Editor
With one or more game objects selected, you can select a tag from the inspecto...