I disagree with the comment that "there is only one home defense gun, a12 gauge shotgun..." While a 12-gauge may be the ultimate, if you are new to guns and can only afford one, the best one for you is the one you shoot best. As a first gun, ideally, a .357 magnum medium frame revolver with a 4" barrel is hard to beat. You can practice with lower powered .38 Special ammo, or even use a good +P lead semiwadcutter hollow point for defensive use. Ideally, you would want a 12-gauge at some point, but again, it's not optimal in certain home defense situations. If you know you have an intruder in the house, you call the police, grab your 12-gauge and ensconce yourself in a "safe room" and wait for the cavalry to arrive. But you can't be calling the police for every "bump in the night" you hear, and there are times you may feel the need to investigate (not the greatest idea, but sometimes necessary). If that becomes the case, a shotgun is rather unwieldy to try to maneuver with, in addition to handling a flashlight, cell phone, etc. That's where the handgun shines.
There are many books and articles written on the subject. I'd suggest you do a search and read as much as you can on the subject, then make a choice that is right for you.