Two of the buttons on the camera have green dots or green labels next to them. Press and hold them for a few seconds and your camera will be reset to factory defaults.
Depends on the type/version you have, some have the green points, some don't.
Also you could remove the battery. I've had to do this a couple of times to restore a camera to sanity, but judging by the error message you're getting, and the fact that when you press the shutter release the mirror moves a little, I do fear it's in need of major surgery.
step 1: put camera into the bin
step 2: buy a canon
more seriously, the mirror could be jammed mechanically or due to low temperatures etc. normally, i would try to unjam by physically moving the mirror myself by hand and seeing what is wrong (e.g. mechanical problem) or whether there is an electrical problem.
seeing as it is new, you might want to return it and get another camera.
EDIT: i googled it for you and found this:
http://www.flickr.com/groups/d40slr/...7608920360100/
and one fix (looks like mechanical issue with gear):
EDIT2:
some people try to lube it it up to reduce time before it happens again:
Nikon AG
Im Hanselmaa 10
8132 Egg b. Zürich
043 277 27 00