Depends on the dog! Haha!
Loki is our resident guard dog. He barks when people come to our house. He barks at children, dogs, and people outside our front window. And he barks at people on the other side of the fence in the backyard. We get lots of false alarms everyday!
Jujube, on the other hand, is a terrible guard dog. She almost never barks. The only time she barks is when she's playing with Loki. Yesterday, someone was walking behind our house on the other side of the fence. What does our girl do? She picks up a stick in her mouth, trots over to the edge of the fence, peeks out, and wags her tail. Very cute! But a terrible guard dog.