You can essentially use any Pentax lens on any Pentax digital SLR. They all fit and work well. Manual lenses ("M") will still require you to manually focus, however the camera will indicate in the viewfinder when it thinks the view is in focus. On the "A" lenses, you need to go into the camera's menu and set it up so that the camera body will understand that the lens has an aperture ring. Also, if you push the little button next to the "A" and turn the aperture ring to the "A" setting, the camera will automatically set the aperture for you.
On the older M42 screw lenses, you will need an adapter that will accept the screw lens, and then has a K bayonet fitting to mount on to the camera. Pentax sells the adapter. Some of the other third party adapters do not have the right distances, so the lens is not able to focus at infinity properly.
Otherwise, you can use the Pentax and all of the third party lens ( both K and M42) lenses.
The only warning I would give is that in the past Ricoh ever so slightly modified their K bayonet mount with an additional pin, that tends to get stuck on the K mount. These lenses are identified with a P/R notation usually. Either do not use them or, remove the pin.
The entry level camera bodies Kx and Kr are suppose to be wonderful. With the release of the Kr, you should find the Kx are some pretty good price points. The Kr is essentially an update of the Kx. The lens that you are asking about is not the best one around - but still very serviceable. That said, the kit lens (either the single lens or one of the two lens kits are a very good value for the money).
hope that helps.....