In macOS, tags provide you with an alternative way to organize your files and folders, and can make items in Finder easier to locate. To tag a file in Finder, simply right-click (or Ctrl-click) it and select one of the colored tags in the dropdown menu.
Alternatively, click on Tags... in the same dropdown menu, type in a custom name for a tag, press Enter, and a new tag will be created automatically, ready to be applied again from the dropdown.
How to Customize Tags and Search for Tagged Items
You can customize which tags appear in the dropdown menu by clicking Preferences... in the Finder menu bar, selecting the Tags tab, and dragging your favorite tags to the area at the bottom of the pane.
You can also create new tags and remove unused ones using the + and - buttons, right-click tags to rename them or change their color, and tick the checkboxes next to them to select which ones appear in the Finder sidebar, because that's where tags show their true worth.
For instance, click a tag in the Finder sidebar, and all the files and folders assigned with that tag will appear in the Finder window, regardless of where they're located on your Mac. You can also search for a tag by entering the tag color or name in Finder's search field, then selecting a tag from the suggestions.
How to Tag Open Files You're Working On
Don't forget, in many macOS applications you can tag the open file you're actively working on. Simply click the arrow next to the document name in the title bar, click in the Tags field and enter a new tag, or select one from the dropdown list.
Similarly, you can also tag new files when you save them. Just select File -> Save from the application's menu bar, and in the Save dialog, click inside the Tags field and enter a new tag, or select one from the list.
Finally, if you don't have a Finder window open, you might find it more convenient to consult Siri to locate all the files that you've assigned a particular tag.
Click the Siri icon in your Mac's menu bar or press Command-Space, then say something like: "Find files with a purple tag." Siri should deliver your results including an option at the bottom to open the tagged files in a Finder window.