orangezorki is exactly right. There's a magic number called the flange-focal distance or back-focus distance or register. The register is the distance from the lens base to the frame (film or sensor). For Pentax, it's 45.46mm. Lenses with longer registers can fit on shorter-register cameras, maybe using simple adapters, and still reach infinity focus. Shorter-register lenses on longer-register cameras can only focus to infinity if an optical adapter is used. An optical adapter is a short teleconverter that stretches the focal length, slows the aperture, and probably causes some loss of image quality.
I won't bore you with the exact numbers, but here is a list of registers, from shorter to longer (the '<' mark means "shorter than"):
Pentax Q < Sony NEX < Olympus m4/3 < Samsung NX < Leica < Canon FD < Minolta MD < Canon EOS < Sony Alpha < Exakta < Pentax PK|M42 < Yashica C/Y < Olympus OM < Nikon
Exakta is close enough to Pentax for fairly simple adaptation. Otherwise, unless some more-or-less severe lens surgery happens, no lens can be fitted to a camera whose name is to its RIGHT on the list. No Canon FDs or EOSs on Pentax or Nikon. In fact, NOTHING can go on a Nikon camera except 1) Nikon-mount lenses or 2) optical adapters for lenses. Or some medium-format lenses, but that's another kettle of fish.
NOTE: When I say a lens won't work, I mean it won't focus to infinity. Shorter-register lenses CAN be used for closeup work -- but how many closeup lenses do you need? And as mentioned, most lens adaptations will NOT have autofocus, auto aperture control, etc. I like to adapt and modify odd-mount lenses, but I know my limitations...