One of the best things you can do for your dog is to have her spayed (called neutering in males). This means the veterinarian surgically removes the testicles in males and removes the uterus and ovaries in females. Spaying and neutering decreases the likelihood of certain types of cancers and aliments they may get. A USA Today (May 7, 2013) article cites that pets who live in the states with the highest rates of spaying/neutering also live the longest. According to the report, neutered male dogs live 18% longer than un-neutered male dogs and spayed female dogs live 23% longer than unsprayed female dogs. Other behavioral problems that can be ameliorated by spay/neuter include: Roaming, especially when females are "in heat.": Aggression: Studies also show that most dogs bites involve dogs who are unaltered: Excessive barking, mounting, and other dominance-related behaviors(Humane Society).
The best time to spay or neuter your dog is before six months of age. This is because a female can have her first heat cycle(bleeding) and the males testosterone is coming to its full peak. If you do it before this occurs you will avoid the secondary sexual characteristics such as lifting their legs and marking, roaming and leaving your property.