To hide a file or folder, use this command in Terminal:
chflags hidden FILE
To turn hidden off, displaying the file again:
chflags nohidden FILE
To apply these commands recursively (to a folder, and all enclosed folders and files, to any number of layers deep) use this command from Terminal:
chflags -R hidden FOLDER
Alternatively, you can set the Finder to display all hidden files. Either press command shift . in the Finder on modern versions of the OS, or run this command from the Terminal for any OS version: