when you turn on the computer keep tapping F8 or F5.a menu will appear,select safe mode.
boot into safe mode then click start/run and type msconfig
click on the start up tab make a note of the items that are ticked and then untick everything listed here click ok and restart the computer.
does it now start up ok?
if so start/run msconfig etc again and put one tick back at a time as before to see if it locks up again.
you may also want to check in start/control panel/performance and maintenance/administrative tools/event viewer and look at the application and syatem tabs for any errors listed(red x`s) and make a note of them or click the link to ms help and support if there is one given to see if there is a fix available.
also check that windows is all up to date click here
to stop the computer re starting and get a useful error displayed(make a note of it) click:
start/control panel/performance and maintenance/system/advanced/start up and recovery/settings then untick automatically restart.
also have a read click here maybe