This article explains how to lock the Windows taskbar so that it stays in one place on your screen. Instructions apply to Windows 10, Windows 8, and Windows 7.
How to Unlock the Taskbar on Windows 10
To lock or unlock the Windows taskbar, right-click an empty space on the taskbar and select Lock Taskbar.
You can also lock the taskbar through Windows settings:
Right-click an empty space on the taskbar and select Taskbar Settings (in Windows 10) or Properties (in Windows 7 and 8).