When does the computer freeze and shut down? If it's not doing it right away (just after you turn it on) it could be a temperature issue. The CPU will shut itself down to avoid damage from excessive heat.
To monitor your temperatures you can download a program called "HWMonitor".
If it's a laptop being used rather than a desktop, check none of the fans are being blocked by anything.