In this tutorial you will learn how to password-protect your screensaver on a Mac running on OS X “El Capitan”.
Having your screensaver locked with a password in “El Capitan” is possible with the help of built-in screen lock feature.
Step 1. Go to Apple menu on a top left corner of your screen and use “System Preferences”.

Step 2. Click on “Security and Privacy” app.

Step 3. Tick the “Require password… after the sleep or screen saver begins” option and choose the timing from the drop-down menu. We will pick 5 minutes.
Result: You are the done. Now every time you leave your Mac for more than 5 minutes, the screensaver will start and it will require password to be unlocked.