Whilst its booting up hit F8. You will then be offered options. You could choose last know good config if you wish or safe mode.
If your machine is just restarting when it hits a problem then right-click My Computer, click the Advanced tab, click Settings under Startup and Recovery, and untick the automatically restart box. You will at least get an error message to work on.