If you want a cheap beginer gun that will not drop your bank roll like a weight in water. I would suggest a Glock. Ectremely reliable, and cheap. They around 500usd. If you want cheaper, the only thing I could recommendwith a lower price is something from the Kel-Tec range of compacts. They are around 250 for the 9mm, and it's damn reliable after break in.
It's all a matter of preference though. If you want small caliber Glock, Walther, and Kel-Tec are the cheapest you can get that are still rock solid reliable. I love all three brands myself. I have a Glock and Kel-Tec. I just acquired my Wlather P99, and am looking for a PPK as well.
I haven't shot the P99, but I have shot a PPK, and it's a smooth gun from holster pull to reload. Cleaning is a pita, but it's not as hard as cleaning the M4gery. Basically I'm trying to sell you on the Walther, because it's the best overall in this range. Not to mention it's a classic, and they are steel framed guns, so limp-wristing isn't as much of an issue with it. You can get the PPK for around 400usd, and the P99 for around 500usd too.
Now matter which one you get, you do need to take a safety course, and check the laws in your area to find out what you need to own one legally. After your first time to the range, don't be hard on yourself with how poor you may have shot. It takes a lot of practise to be able to hit a still target decently, and even more to hit a moving target.
I see people that go hunting, and have been going for years, and when they come to the rifle range on base for the first time, they learn that they weren't shit out at 100 yards or more. Now mind you we are talking rifles that are zeroed at 300 yards, and only require a steady pull and decent aim to hit the target.Then again, I have seen people that have never shot a gun before in their life come in, and spend hours a t day learning how to shoot a rifle properly, and hit a target dead on. It just takes practise, and good habit mentallity.
Feel free to contact me via the site's PM if you have any serious questions related to this topic.