When the mouse freezes, does the keyboard still work? (Try Ctrl+Alt+Delete).
If the keyboard isn't working either, the probably is not the mouse.
Are other USB devices working? It's possible that the USB ports are failing.
It's also possible that the computer is simply locking up, which would indicate a more severe problem.
Knowing nothing about your computer (and not knowing how well you are describing the problem you have), that's all the help I can offer.