Google the "Castle Doctrine". It varies state by state, but basically allows for an individual to defend their home (and sometimes other property) with equal force to a trespasser. That means if someone invades your home, and is threatening you, you can use necessary force to protect yourself and property.
In my state, Texas, you have to yell 'stop' or 'leave' or something along those lines before firing. The invader also has to continue to approach you after you warn them and there needs to be a reasonable assumption that you felt in danger. You're going to get in quite a lot of trouble shooting someone in the back, even if it is on your property. Or if it's a child or someone who is not threatening to you. (e.g. you're a 280lb 6'6" guy and a 80lb girl with no weapon approaches you, it would be unreasonable to think you were lethally threatened and should use deadly force - like a gun).
Hope that helps!
P.S. I am by no way an attorney, so please don't use this as legal advice.