Sounds like a runaway process or you’re doing some heavy duty processing.
As rockhopperbike says, start activity monitor and look for processes using high % CPU (99% and higher). Sort by % CPU to make it easy. If one process stays at the top for a while consider killing it. Usual culprits are webkit components, Chrome components, or a couple of the daemons.
Another check to make is CMD+option+esc and look for ‘not responding’ processes. If you’re happy to, kill those.
If a process takes a long time to write to a disk (local, or networked) it can appear ‘not responding’. If you kill it you will likely lose any work since the last save.