Handguns are perfectly functional, with the caveat that you need to use a large enough caliber. Technically speaking, any gun can work, but below a certain size threshold your chances of success drop significantly.
Modern handguns:
@Threads's preference for a .357 is well founded. A .357 is the benchmark against which all other calibers are measured for "stopping power."
Gun calibers can be extremely confusing --the more you look, the more confused you'll get-- but a good rule of thumb could be:
Revolver: anything .38 Special (marginal! --see note under ammunition) or larger --.357, .44, .45 Colt, .45ACP, etc.
Semiautomatic: anything 9mm or larger --.40, 10mm, .357Sig, .45
Avoid in either type of pistols: .22, .25, .32, .380, .38ACP. Will some of these smaller calibers work? Yes --technically. I have a .32 Auto that is likely to be my choice since it'll leave less mess than my .45ACP. The .380, aka 9mm Largo, is a good round, especially with modern ammo. BUT, you had better be very confident of your aim (I have shot competitively). If you are reading this thread with even a shadow of a doubt about where you need to aim, you should not look at these smaller calibers.
Revolver or semiautomatic?:
Revolvers are mechanically simpler and often attract less attention during purchase. You can also find them with a 2" "snub nose" barrel that makes them very easy to handle.
Semiautomatics have become far more common than revolvers, so might be easier to acquire, but they are more mechanically complex.
And once again, Hollywood is a shitty place to learn about how to use either.
Ammunition:
Always, always, always use hollowpoints, sometimes abbreviated in conversation and on the box itself "JHP" (Jacketted Hollow Point). JHPs deliver all the kinetic force of the bullet in as short a distance as possible. I.e., into your head, rather than into the wall on the other side of you. The brand doesn't matter; they all work.
If you are using a .38 Special revolver, which is marginal, look for ammunition labled "+P" or "+P+". These are designations meaning the ammunition has been loaded with more powder than the standard ammunition, and thus will deliver more power.