You can encrypt a Microsoft Word document by giving it a password, which anyone who tries to open the document will be required to enter.
You can password protect a PDF on a Mac computer using the Preview app to secure files that contain sensitive information.