Test the touchpad to make sure that it isn't damaged. Do so by swiping a finger in all directions on the touchpad. If it still moves, though erratically, it could be damaged rather than locked. If this is the case your laptop's Touchpad may require repair.
Press and hold the laptop's FN (function) key found at the bottom row of the laptop's keyboard. It is typically found next to the Windows key and its text may be colored differently than the other keys.
Press the F9 key typically found on the top row of a laptop's keyboard while holding the FN key. The touchpad should now be unlocked.