I hope you'll enjoy this site as much as I have. I have in the past seen other sites where people will ask questions like this and get an array of insulting answers from armchair commandos who don't own half of the guns they brag about. I've found that in stark contrast, the most knowledgeable people here normally have logical, sensible answers and are very practical.
You sound essentially like someone brand new to the wonderful world of shooting, and you also sound like the kind of person I empathize with. You wouldn't know it from my online activities, but defensive shooting is just another part of my life much like my interest in pickup trucks or my interest in computers. It's a practical, sensible person who asks such a question as yours and by doing so, you have taken a first step towards living a better and safer life.
I will precaution you that knowledge and methodology is paramount when we are talking about a firearm in a defensive role. However, none can deny that if one does not even have a firearm in the first place, it's quite difficult to practice with it.
To better answer your question, I'd have to ask you some personal questions: How much money are you willing to invest? What is your specific purpose for the firearm? Do you have any sort of criteria for it? How do you plan to store and maintain it properly? What is your previous experience with firearms? Have you located some sort of local facility where you can at least practice with it in some capacity or possibly receive any sort of training? That last one is key.
I will warn you that while this process isn't prohibitively expensive, especially if you make use of free knowledge available from sites like this one, it does require a commitment of your time and money, and it requires you to have a serious mindset. Personally I view it like I view paying my insurance premiums.
In a lot of localities you can find very affordable "Learn to Shoot" classes. This will usually require an investment of $50-$75 and are typically about 4 hours long. This would be a great place to start. They begin with safety, handling, and good solid basics that we all must spend time relearning every so often. A lot of these classes are put on by people who care, and they often bring an assortment of common firearms for you to try for yourself.
At this point I would caution you that you really should maintain some modicum of practice and training with any firearm. I personally will not sit here and lecture anyone on how much is enough because this is a free country and we must all make that decision for ourselves.
I would also like to add that I view expertise in firearms as something you build and cultivate over time. The more I learn the more I realize I don't know. However, firearms do offer an excellent return on your investments in practice and training so take heart. Honestly if you fired one box of .22 LR cartridges at a target once a month you'd likely be a better marksman than a sizable portion of our military and police forces.
Now as for what kind of gun to get, there are as many good answers to this question as there are people. I'll give you my 2 cents: if this is your first gun, and you just want a gun to have a gun, I'd start with a quality .22 caliber rifle. I'd also get a copy of Cooper's The Art of the Rifle and read it thoroughly before I took the aforementioned "Learn to Shoot" class.
I hope this helped a little bit. And the more you volunteer to tell us, the more useful and specific responses you'll get.