Try restarting the computer (turn it off and back on) and while it is off, plugging in an external mouse and see it will work for you. Should that not even work, then you may have something on the computer that is causing the problem. Virus, malware, etc. In that case I would try again turning it off and then start it up in "Safe Mode". If everything works fine in there, then you know you have to locate and remove whatever is causing the issue. If, however, it still won't work, even in "Safe Mode" then you may have a hardware problem.
How to enter "Safe Mode" when booting the computer.
In Windows 8 and 10...
As your computer restarts, press F8 (possibly a few times) to enter "Safe Mode"
a. Press the "F4" key to Enable "Safe Mode"...