If you have multiple monitors and are using OS X Yosemite or later, you will have Apple’s latest multi-screen implementations available for use, where unlike classic extended desktop setups, each screen can be treated as a separate space, or “virtual desktop”, upon which you are doing work and organizing your windows.
As with standard spaces in OS X, when you switch between your windows, system services like the Dock and Menu Bar can also switch to be available in the active window. The Dock does require you move your mouse to the bottom of the active screen in order for it to switch to that screen; however, there are times that when you do this, the Dock will remain stuck and not move back to the initial screen.
This issue usually happens because of a configuration bug in the Dock, and the easiest workaround is to simply spur a change to the Dock’s configuration so it is reloaded and works properly. An easy solution in this manner is to right-click the Dock’s separator on the screen where the Dock is stuck, and choose the first option to turn hiding on. You can also enable this by pressing Option-Command-D in the Finder.
When done, move your mouse to the bottom of the screen where you want the Dock to be, and repeat the hotkey or use the menu to turn Dock hiding off again.
Alternatively, you can disable the approach for using each screen as a separate space. This is done using the check boxes in the Mission Control system preferences; however, this approach will adjust how windows and screen elements are handled between your displays. Give it a try, and if it works better than the OS X default then stick with it, or switch it back.
Or simply quickly swipe your cursor down on the monitor you want the dock to appear on!
What I do is keep a .jpg down near the dock on the monitor I want it to be on. When I want the dock to snap back over I grab the .jpg and pull it down into the dock area and it snaps back over.
If turning hiding on/off isn’t working go to “dock preferences” and check the radio button for left or right, then centre again.