Hidden files and folders in Mac are hidden by default. It can be made visible by running the following command via Terminal.
Open Terminal by clicking the launchpad, then select Utilities and then Terminal App from the list.
Run the command
defaults write com.apple.Finder AppleShowAllFiles YES
Now hold ‘alt’ on the keyboard and right click on the Finder icon
Click on Relaunch
Now all the hidden files and folders can be seen.
If you wants to hide all the hidden files and folders then run the following command
defaults write com.apple.Finder AppleShowAllFiles NO