I own a number of firearms, I teach firearms safety, and have a Curio and Relics license.
When it comes to a firearms purchase, I ask: what is this firearm for?
Starting off: you want a pistol.
What is it for? Just for screwing around and practicing? Possibly defense?
First pistol I honestly recommend- especially for first-time pistol owners- is a pistol chambered for .22 Long Rifle (.22 LR) It's got low recoil, accurate, and most of all: cheap ammo. (Pistols are pretty inexpensive, too.)
As a side note: do not- not not not- discount the .22 LR (*not* .22 Short) as a self-defense round. While it's not much in the stopping power department, it's actually far more lethal than people seem to think. High velocity combined with a soft lead bullet- a pretty heavy one for its size- make .22 LR extremely lethal to humans.
If going beyond this, or you want defense as an option, I recommend the following calibers (in order of preference):
.45 ACP
.40 S&W
.38 Special
9mm
.380 ACP
Myself, I carry a .45 ACP firearm for defense. My personal favorite is a Taurus 1911B, but there are hundreds to choose from. The round is large and subsonic, so overpenetration (going through walls) is less of an issue, but it has extremely good damage qualities and moderate recoil.
For semiautomatic pistols, there's hundreds- my suggestion is this:
1. Pick the caliber you want. Do *not* get anything larger than .45 ACP unless you intend to Hunt with it or are an experienced shooter. Caliber is the first, most important choice, because after you pick that picking a firearm chambered for it is easy. Don't pick a caliber that isn't as common as possible- if this is your first pistol, you want ammo to be cheap, easy to find, and allow you to practice as much as you want. Where I live, .45 ACP ammo is about $15 USD for a box of 50, 9mm being about $10 USD a box of 50. (.22 LR is sold in 'bricks' of 144 rounds for something like $10 US or less, you can do the math on which is cheapest to plink at cans with
)
2. Handle the firearm you are interested in. I can't stress that enough- it doesn't matter how amazing or expensive a pistol is, if the shooter is not comfortable with it, leave it alone. Handle a variety of arms. Which one fits your hand? Don't be macho- if you have small hands, it's not a criticism; find a pistol with a smaller grip. Word of advice- don't get caught up on 'high capacity'; between 7 and 10 rounds is plenty, and you should be more concerned with placing your shots and not blazing away because you have a 14+ round magazine.
3. Check out the firearms you have handled and like online. There are thousands of sites which review just about every firearm ever made, and usually they have detailed, experienced reviews of the firearm in question. Also, don't get roped into a 'sweet deal' that might be hard to get parts for. Owning a pistol you got cheap will hurt you if no one makes magazines for it (it's happened to me more than once.)
For revolvers, the above 3 rules apply, with some specifics:
1. Again...nothing larger than .38 Special. I have lost track of the number of newer pistol owners who have come to me to train...with some god-awful piece of ironmongery capable of shooting through an engine block. No. If you are experienced and intend to hunt large animals with it, go nuts...but not for any kind of defensive purpose. I do recommend buying a revolver chambered for .357 Magnum, then using .38 Special as a carry load (the load you keep in it for defensive purposes) but .357 Magnum is, to me, heavy for defense.
Side note: .357 Magnum and .38 Special are, in effect, the same caliber. The only difference (despite the different caliber numbers) are that .357 Magnum has a longer casing, more powder, and a slightly longer, heavier bullet. A revolver chambered for .357 Magnum can be loaded with .38 Special ammunition and fire it without issues, and many people do just that so they have a heavier, sturdier pistol (the weight helps absorb recoil.)
Brands I personally endorse (and this is solely from my own experiences and that of people I trust, this is not an exhaustive list):
Semiautomatics: Colt, Taurus, Springfield Armory, Glock, Walther, Heckler and Koch, Browning (Browning Hi-Power is amazing), FN.
Brands I avoid: Smith and Wesson (great revolvers, dislike their semiautos), Beretta, Hi-Point (cheap crap)
Revolvers: Smith & Wesson, Ruger, Taurus (newer models are great), Dan Wesson