That's not a crash, but whatever.
I'm terribly unfamiliar with macs and their particular issues (bought my first one about a month and a half ago), but from my general computer knowledge I'd suspect the harddrive, assuming the problem is with the Mac itself.
Could be you have a lot of bad sectors on the drive, the freezing episodes you're experiencing could be due to the drive sitting there retrying countless times to read or write some particular sectors. A drive diagnostic tool might be able to tell you more.
If this had been about a PC it could just as well be a bad piece of software or maybe corrupt operating system ("windows rot"); I don't know how susceptible Macos is to that sort of thing though.
What stuff are you running when this happens, can it occur spontaneously or at any time even with no running applications at all (even background programs that autostart perhaps)?
Try to eliminate as many factors as you can. Quit all open programs except for the one you're currently working in, including stuff that just sit in the menu bar beside the clock. Try to watch for the spinning circle. See if it happens more often with one program than with another, and so on.