You can indeed use old lenses on new DSLRs of the same mount. The quality varies from lens to lens. Some perform well, others don't. Some of the influencing factorsa are the angle at which light rays exit the rear element and hit the sensor (the more straight-on the better) and the coatings used on the internal and exernal elements.
Also, not all of them provide full functionality. With some old lenses you'll lose the auto aperture stop-down and perhaps even the TTL metering.