A lot of digital camera users are buying older M42 Pentax screw mounting lenses to use on their cameras.
There are a lot of adapters offerd for sale on eBay. Not all are good.
The best one to get is the genuine Pentax item. They are not much more expensive than other makes, and you can still buy them from Pentax if you want.
Other makes vary considerably.
The main thing to look out for is if it sits flush with the lens mount. If the adapter has a flange, on the front it won't. Adapters like this will not allow the lens to focus at infinity. Pretty important for a lot of photoghaphy!
Check also that they will lock into place. The genuine Pentax item has a sprung clip which engages with the camera mount when the adapter is porperly fitted. It has to be released using a point object or fingernail in order to remove the adapter. (Pentax make a special tool for this, which is quite unneccesary!) Without such a locking mechanism unscrewing the lens will also remove the mount. (On Pentax film cameras it also ensures that the aperture ring coupling is set to the default ensuring proper metering.)
Some adapters have a secondary flange on the inside of the mount. This is intended to depress the pin which operates the aperture on auto lenses. If the lenses you have are equipped with an auto-manual switch, or you use a stop-down or preset stop lens, this is unnecesary. If the lens does not have a switch, but does have a pin then it is possible to glue it in the depressed position with a small drop of epoxy glue. (It is not too difficult to unstick the pin if you change your mind. With most lenses at least!)
So this extra flange should be thought of as a luxury, unless you intend using a valuable collectors piece.
That's the basics, but should tell you enough to avoid buying an adapter you don't want!