That lens is an 'M42' mount...so it can't be directly mounted onto your Nikon camera. You can get an adaptor (See Here for an example).
However, the adaptor moves the lens farther away from the camera, so you can't focus to infinity. You would also have to set the aperture manually.
You may be able to find an adaptor that has a lens element, and would be able to focus to infinity...but the quality of the lens element is usually pretty crappy.
So unless you have a great lens, it's usually not worth the hassle (unless of course, you just want to play around with it).
I'm not sure the purpose of the pin...I don't have any cameras with M42 lenses. It might be a locking pin or something like that.
Have you looked into your camera with the lens off? The sensor is way down in there. If anything, the mirror might cause an clearance problem...but probably not.