I'm dualbooting Ubuntu 16.04.1 and Windows 10, but when I boot the Ubuntu OS every once in a while, like every 30-60 seconds the mouse freezes and stops moving. The keyboard also doesn't seem to register every key I press, and sometimes it holds down a key while I'm not even touching the keyboard. This is not happening on the Windows 10 OS, everything is working fine there. My keyboard is a very old Dell SK-8115 and my mouse is a Rapoo N6200 but that shouldn't have anything to do with it since they work fine on Windows 10.
A potential cause for the freezing of the keyboard and mouse on Ubuntu 16.0.1 is that the Ubuntu system is under excessive load, for instance runs very low on RAM when the input freezes. You can diagnose that by typing
in a terminal window (Ctrl - ALT T). While freezing may be an issue with your mouse or keyboard driver in my experience occasional or hickup freezing of the mouse or the keyboard is often a symptom of other issues with your system. For instance a process that eats all memory or overheating.
I experienced the same symptoms that were caused by excessive load and I resolved the cause of the load. In my own case I discovered my previous swap RAM was missing after an Ubuntu 16.04.1 update. Adding swap did not revolve the issue as the memory still quickly ran full via a fcitx startup process. I also had to deinstall fcitx and em-config and installed a proprietary driver for my Intel board (Processor microcode firmware for intel cpu) offered via the Ubuntu Software Center (Menu: Edit - Package sources - Tab Additional drivers). Your case and solution may be entirely different but first you should monitor CPU and memory.
The reason why I recommended you "top" instead of the standard system monitor utility was that in situations where your system input freezes/hickups it gets more difficult to launch the system monitor gui utility. If you are able to launch it, you may as also take the "system monitor" tool for diagnosis.