At six months of age. You can't teach a dog about dog sex; you don't know anything about it. What you CAN do, though, is have it spay/neutered as soon after six months as possible, before HE starts hiking his leg, and before SHE come in heat the first time. Doing this for your dog will calm their hormones down, and reduce the possibilities of uterine diseases, pregnancy problems, and dealing with "heat" and blood, and male dogs hanging around, etc every six months. And you reduce (not eliminate) the male dog humping everything and everybody, and keep him from hiking his leg and marking all your furniture as his territory. From the nature of your question, I think I can assume you don't have much experience with dogs, especially about breeding and whelping, etc., so I definitely recommend that the best sexual "advice" you can give your dog is have it fixed!