This chart doesnt' make a lot of sense to me... has th k-x listed twice, and on one it says the lens works, on the other says it doesn't...
http://www.mosphotos.com/PentaxLensCompatibility.html
I'll look at it tomorrow after I get some sleep, maybe it will make more sense to these blurry Plumbers eyes then!
With Pentax lenses, there is always backwards compatibility. The only issues are when you use newer lenses on older cameras, and even then they will generally work but you may lose autofocus or the ability to stop down the lens. If you are looking at older lenses, there's basically a few different types of lenses you'll find:
Lots of older (and some newer) lenses are manual focus. Obviously they'll still be manual focus on your camera.
Older lenses may not have an "A" setting on the aperture ring. (Your K-x kit lens doesn't even have an aperture ring; this is normal on most anyone's newest lenses as digital cameras don't need them, only pretty old film cameras.) What this means is that to meter properly (that is, for the camera to get the correct exposure), you set the aperture on the lens itself, shoot in Manual mode, and press the Green button to stop the lens down and take a reading. This is really a pretty minor task but it is an extra one.
Finally, you have M42 screw-mount lenses. These are generally real old (30-50 years old) but many still have very good optical qualities. Most of these have an "A/M" slider (auto/manual); you will want M mode. When you change the aperture, it changes immediately which means that the viewfinder will be darker as you choose smaller apertures, but you can shoot in Aperture Priority mode and it will meter automatically.
A couple other quick notes - for lenses without an "A" setting (older K-mount and all M42-mount lenses), you will first need to go into the Custom menu on your K-x and set "allow aperture ring" to "permitted". (I may not have the wording exactly right off the top of my head - it is the last setting on the last page.) Also, the built-in flash will often not work correctly because it needs to know the aperture that the lens is set to in order to fire at the correct brightless, and the lenses without an "A" setting don't give that information to the camera.
One last note - there is a firmware update for the K-x, too. They are very easy to install, just make sure you have fully charges batteries in it (I used the lithiums that came with the camera.) You can get it from Pentax's site.
If you have any more questions, just ask!