How to tell if the lens will fit?
First of all, I have no knowledge about cameras or photography whatsoever. I was cleaning out my mother's closet and happened across an old film Nikon with a nice looking lens in the bag. I think it's a 300 mm. If I were to buy a digital Nikon, how would I know if the lens would fit? I'm not sure of the lens brand, if that's relevant. I could do some digging and find a booklet or something if I have to. Again, I know absolutely nothing about cameras, so thank you for answering my question.
The lens will physically fit and it will form a picture in the camera.
However, both the autofocus and the automatic aperture may vary. Some modern lenses have the motors in the lens and they need instructions and a power source from the camera. Other lenses don't have the motors, and the motor is inside the body of the camera, which drives the lens with a mechanical coupling. Some lenses don't allow the focus or aperture to driven from the camera body, even if the body supports it.
Today's digital Nikons vary as to whether they provide an autofocus motor in the body, and lenses vary wildly throughout history. Probably your best bet is to let us know the exact model of the lens (and all markings on the lens barrel), with a picture if possible. Then we'll be able to figure out what the lens can do, and recommend a digital body that can take advantage of the lens to its fullest.
Sorry if this seems a bit complicated. Nikon had a policy of retaining the physical lens mount for many decades and incrementally adding extra features, so all lenses fit but the level of functionality varies. Canon took the opposite approach and in 1987 they threw out their old FD lens system and introduced a totally new, incompatible system. People grumbled at the time as their old kit was not usable on new bodies, but any Canon lens sold since 1987 will work on any Canon camera sold since 1987 - including today's digital lineup - with autofocus and automatic aperture.
Hope you enjoyed the history lesson.