Unlike a female, a male dog will be biologically ready to continuously procreate once it hits puberty. In fact, the urge to procreate will not subside in some neutered male dogs.
Dogs learn a lot of things through the socialization process and sexual intercourse is partially learned through experience. The puppy may begin to play out some actions at around 3 to 4 weeks old. Males will start humping all sorts of objects but they may not be particularly attracted to the opposite sex.
At around 5 or 6 months, some males will be ready to procreate and most dogs will show more interest in the opposite sex within a year or two. Smaller dogs are more likely to mature faster. The males will be attracted to females in heat by pheromones found in her urine like methyl p-hydoxybenzoate (methyl PHBA). Sometimes the female will help a newcomer in the process.
Dogs are social animals. A young male dog may be inhibited by the presence of a dominant leader. This might include the human owner.