If your Windows 7 is freezing or crashing randomly; then there can be many reasons and many solutions many too.
Run your latest Anti-Virus and your Anti-Spyware/s, followed by a CCleaner.
Next, turn off your Aero, and see if its helping.
Else, turn off the Indexing Service.
Also delete several non-Microsoft items from Start-ups which you do not need every time you boot.
Next, check for Error Events : Start->settings-> Control Panel > Administrative Tools > Event Viewer > Custom Views > Administrative Events. See if any recent events show a round red exclamation mark error icon. If yes then double click on it and an Event Properties window will pop up. See if the information helps you resolving the issue.

