There are numerous adapters offered for both M42 (screw mount) and P/K (bayonet mount, such as the "M" and "A" series) Pentax lenses. Look on eBay, Amazon and at the big online retailer websites. They all have them.
You'll find both basic and "chipped" adapters.
The "chip" allows your camera's AF Confirmation to function, which can be helpful since modern DSLRs don't have much in the way of manual focus assistance features.
You will need to use the lens fully manually... both focusing it and setting the aperture by the ring on the lens. Your camera can be used in the M (manual) mode, or in Av (aperture value auto exposure) mode. With the adapted lens, it cannot be used in Tv, P, CA, A+ or any of the even more highly automated "scene" modes found on many Canon DSLRs.
As you manually stop the lens down, your viewfinder will also dim down along with it, making manual focus even more difficult. Depending upon how bright the scene you are shooting, AF confirmation will work until you stop down to f5.6 or f8, typically. Beyond that, it will start to struggle pretty badly, eventually giving up entirely.
This was shot with a vintage, manual focus Tamron SP 90mm macro lens that I've adapted for use on Canon...
$20 for the lens, $40 for the adapter (incl. shipping from China, via eBay). $60 total for a fine macro lens! Not fast to work with, though. To get the above (at f11), I probably took about 75 shots, only a few of which are "keepers". Of course, working with non-macro and stationary subjects is a lot easier.
More info about adapting various vintage lenses for use on Canon can be found here...
http://www.bobatkins.com/photography/eosfaq/manual_focus_EOS.html