I'm not going to lecture about the wide variety of M42 screw-mount lenses. They're all over the place. You can get some amazing lenses, and for very little money.
What I'm going to talk about here is the practicalities of hooking one up to your Pentax *ist DS digital SLR.
First things first: In order to use an M42 lens, you'll need a K-mount to M42 adaptor. Pentax sells these, and I think there are a few other companies making them. I found mine at Jim's Used Cameras in Seattle, Washington. Search ebay and you'll find a dozen hits. Not hard to find.