If you own a dog that has not undergone protection training the answer is maybe, but maybe not. The only real way to tell is to have a real intruder break in to your house and see what your dog does. Unfortunately that’s not really the time you want to be testing the waters. Some dogs may have the impulse to attack or intimidate an intruder, while others may have a tendency to run away and hide. Still others may try to help and dissuade an intruder, but without the proper training they may be inefficient at best and put themselves in danger at worst. The majority of dogs that have not undergone protection training will bark and jump and growl until the intruder is inside, then they will retreat and hide from the threat.
Dogs that live with humans as pets have no experience fighting, using their teeth and jaws or dealing with true threats. Dogs are generally protective of their homes though, they are territorial animals and have a keen sense of what is their property. When an untrained dog seems to be protecting their owner, they may actually just be protecting their home.
Dogs protecting humans isn’t necessarily a natural behavior, but because dogs are loyal to their owners, they do take to protection training very well. Protection training helps dogs to understand they must help protect their owners, not just their homes.