When you need to block someone from using a shared computer, you can just disable their account on Windows 10 — Here are two ways to do it.
On Windows 10, you can add multiple accounts to share a device with other people — that way everyone can have a personal and custom space with their own desktop, browser bookmarks, and separate files.
When an account is no longer needed, using the Settings app is also super-easy to delete a user along with their settings and files, but if you only need to block someone temporarily, you won't find an option to simply disable an account. However, it doesn't mean that you need to lock the door or delete the account just to temporarily prevent someone from accessing the device, as it's still possible to use Computer management and Command Prompt to disable an account.
Full story from the WindowsCentral blog...