You want to protect your folders or files from others, such as when using a shared computer at work or school by example.
Sadly Microsoft has removed password protection for opening folders from your session since Windows 8. This means that if you accidentally forget to log off, anyone can open your folder and the files in it.
However, if that person logs on from another session, or if they export your protected files to another computer, they won't be able to open them.
If you want to use a password to open your files, you'll need to use third-party software, the easiest way is to use options like 7-Zip or WinRAR.