Owning and carrying a gun is a very big responsibility and should not be taken lightly. The best thing you can do is read up on the laws in your state.
Here in PA the castle law use to state the only place you could legally hold your ground and use lethal force was in your own home. If you were out and about you had to make an attempt to flee when in danger before lethal force was legal. In the past year that has changed. Now you do not need to flee if you feel you life is in danger.
To those saying that you would just shoot to hurt them. They can and will sue you when they recover and they will win. As bad as it is I had a officer tell me that. Plus there has been stories about people breaking into houses and fell down the stairs and sued the homeowner and won.