Files/Folders in macOS can be hidden is two ways. The first is to start the file/folder name with a . as noted by Encryptor5000. The second is to set a Finder flag on the item(s). By using a Finder flag, you do not need to alter the file/folder name.
Let's use an example of a folder on your Desktop called SecretStuff. The relative path is ~/Desktop/SecretStuff. To see the permissions and the flags, open Terminal and run this command:
ls -lO ~/Desktop
(that is a capital o, not a zero)
You should see a line something like this:
drwxr-xr-x 2 youraccount staff - 64 Sep 6 20:19 SecretStuff
To set the hidden flag on that Folder, open Terminal and execute the following command:
chflags hidden ~/Desktop/SecretStuff
Repeat the ls -lO command to see the addition of the hidden flag in the flags column.
ls -lO ~/Desktop
drwxr-xr-x 2 youraccount staff hidden 64 Sep 6 20:19 SecretStuff
The folder is now hidden. Using Command Shift . you can toggle between show all files/folders and show visible files/folders.
Please note, while both methods above will hide an item, items with the hidden flag can still be found by Spotlight. Items that start with a . will not appear in Spotlight results (via Spotlight menu or mdfind).
Also, make sure you do not forget about your hidden items. Out of sight, out of mind. Make sure you backup the data in these hidden folders or put things in there that you can live without.
To unhide an item hidden by a finder flag, simple reset with the nohidden flag like this:
chflags nohidden ~/Desktop/SecretStuff
Hope this helps. Don't forget where you hid stuff.