It can be several things.
1: You will need to know if the sensor is working. Try to make very long exposures, starting with somthing like a second in daylight going on to 10 seconds in daylight.
If nothing registres on the sensor i would fault the sensor / body.
2: If anything registrers on the sensor, i would look at the aperture. It could be stuck aperture blades in the lens or a stuck aperture "lever" on the camerabody
You can also try removing the battery and memory card for a few minutes, and reinsert to see if that solves the issue.
In the menu settings try to do a reset for the camera
Find the reset switch located on the bottom of the camera
If you can't find it, see page 120 of the D50 manual
This is a hard reset of the Camera.
This has to be asked because it has happened in the past.....is the lens cap off?