Supervision Equals Safety
Supervision of kids and dogs is the single most important step you can take to ensure the safety of both. Along with allowing you to see any inappropriate behavior by either, supervision affords you an opportunity to referee and teach both how to play together productively.
The Under-six Rule
Children under six years old should never be left unsupervised with any dog, even your beloved family pet. Young children are so impulsive, and they can and will do all kinds of things to dogs that even if well intentioned, may cause the dog to feel that he needs to defend himself. Toddlers need particularly close supervision, as their jerky movements, high-pitched screams, and tendency to tightly grasp things (in this case, maybe your dog's ears, feet, or tail) are unsettling or downright frightening for many dogs.
The relative size and strength of kids compared to your dog is another factor to consider. Even small dogs can quite easily overpower a child that is three or four times their size. Dogs, especially young ones, often treat small children like littermates, thinking nothing of mouthing; bodyblocking; knocking them down; and snatching snacks, toys, or other items out of children's hands. In addition, the small stature of young children often puts them at face level with dogs, encouraging some dogs to believe that a child staring at them is challenging them for dominance, an invitation for disaster.
According to DogBiteLaw.com, about 70 percent of serious dog bites are inflicted on children, usually younger than 10 years old. Most of the bites are to the face, and are inflicted by a family dog or another dog well known to the child. Lack of supervision and clear direction for both kids and dogs is at the root of most bites.
Playing Nice
Of course, if you have both kids and dogs, chances are they are going to play together. How they play is important both for safety and because of how it affects the overall relationship between them. Any physical play between dogs and kids should be closely supervised, and children should never play physically competitive games with dogs, like tug of war or wrestling. Any time the dog wins a competitive game with a child, it encourages the dog to believe that he is above the kid on the relationship totem pole.
Instead of competitive games, teach kids and dogs to play cooperative games, like fetch or find it. Both kids and dogs usually love playing find me, in which a parent or someone else who can physically control the dog restrains him (or, if his level of training allows, leave him on a wait) while the child hides, then calls the dog to find her, rewarding the dog with lots of praise and treats when he gets there.

