While it is tempting to think that your camera will keep on functioning for as long as you want it too, this is unfortunately not always the case.
One variable in the camera's lifespan that is often asked about is the shutter's lifespan. One of the most important parts in the camera, the shutter is a precision electro-mechanical device that will potentially fail at some point in time.
The usual factor in determining the remaining life in the shutter is the number of movements, or 'actuations', it has made so far. One actuation is one photo.
Nikon guarantees the shutter mechanisms of the D40, D40X and D60 to 50,000 actuations. (As a point of reference, the titanium shutters in the professional-level F3 were rated to 150,000 actuations, and the current pro bodies such as the F6 and D3 are rated to 300,000.)
This does not, however, mean that your camera will die the instant you take picture # 50,000. Nikon's guarantee is that that shutter has been designed to perform at least 50,000 actuations, and that production samples have consistently achieved that number during testing.
Of course, as a precision device some failure must be expected and some people do report shutter failure before the 50,000th actuation - but many people also report shutter life far in excess of the rating.
If you wish to check the number of actuations recorded by the camera, you can use an EXIF viewing tool (including the "More Information" link on Flickr) to find the appropriate tag in an unedited file.