|You have not provided much information to go on.|
What computer (make/model or detailed system specs)?
Have you been having any other problems recently (even if it does not appear to be related)?
How long were you on the computer when it appeared to turn off?
What were you running (Browsing, gaming, office programs, etc.)?
Have you installed any software or hardware recently?
Have you changed any BIOS settings recently?
Is your system Overclocked?
Does it restart after you do shut it down? If it does, do you get any information, warnings (like 'windows did not shut down properly last time....'), or special boot options? Does it appear to be running normal now?
Has it repeated this 'shut down' more than once?
If it is now running, download Speedfan and also report your temperature readings.
You have to be a little bit crazy to keep you from going insane.
If all else fails, read instructions.