Can you give us some specs? How much RAM do you have, CPU? What sort of processes are running/taking up RAM? Does this happen if you run your computer in safe mode(press F8 while your laptop is booting)? You could very well be running out of RAM, but it's a matter of what's causing it.
After giving us those details you can run a scan with HiJackThis:
http://download.cnet.com/Trend-Micro...-10227353.html
and give us the log.