If you only buy one, it should be a .22; a Ruger Mark II comes to mind. Starting with a centerfire as a first pistol, all you'll learn is how to flinch.
AFTER you learn to shoot with a .22, a Glock 19 (9mm) will do everything a handgun can reasonably be expected to do.
What Cat said.
You'll still have to take a handgun safety course before you can get a handgun. If you DON'T know what you want to get, I suggest looking for a class where there will be a variety of different handguns to try out. I teach with LIFE, but there are definitely others who have good varieties as well. What works for me might not work for you. I prefer the 9mm cartridge, because it's cheap and I shoot it a lot. My friend prefers the .40 S&W because he feels it's the perfect compromise between 9mm and .45 ACP. Still, others may prefer revolvers because of their near-perfect reliability (and they look so badass).
This past Sunday, there was a woman who wanted a handgun for home defense. She seemed pretty stuck on the .40 S&W cartridge, because she felt that was the biggest bullet she could fire while still being able to control the handgun. I prodded a little deeper and found out she had been firing mostly the polymer handguns. Since she has no option to carry here in Hawaii, I suggested she try a steel 1911 in .45 ACP. She discovered they both recoil about the same, and she could control the 1911 quite well.
Then again, the primary use of your handgun might not be self defense, but rather Bullseye competition. For that, you might want a revolver with a long barrel for a nice, long sight radius, or a long-slide semi auto.
Still, there's action pistol. It's similar to home defense, but you might want to find a gun which has a good variety of aftermarket and extra parts, such as holsters, spare magazines, barrels (to be used with cheaper lead ammunition), and ability to change sights, among other things.
Do you want to hunt with it? There are specific requirements for hunting handguns. There are minimum barrel lengths and minimum cartridges.
Once you get into firearms, you'll find that there's no one perfect handgun for everything. As Cat said, a .22 handgun will teach you excellent basic skills. It also allows you to shoot a lot for cheap.
So again, if you already knew which gun you wanted, hell, take the Hunters' Ed course. If you're not too sure, find out what class gives you the best selection to try out.