I concur with the "take a class" suggestions. They are almost always well worth your time and money.
Also, memorize and always follow the four rules! They will keep you and everyone around you safe and happy.
As for a gun, I would suggest a .22LR or a 9mm (.357 if you want a revolver, as they can shoot .38 as well). The advantage of the .22 is that ammo is a LOT cheaper ($20 can get you 500 rounds, compared to about 100 rounds of 9mm). They also don't recoil as much, so you have less of a chance of developing bad habits. The advantage of a 9mm or .38 is that they are suitable for defensive use and shooting games like IPSC or IDPA (very fun, in my opinion). They will also help you to learn recoil control...as recoil control in most .22 handguns consists of doing pretty much nothing.