When copulating, a male canine initially mounts the female from behind, as with most tetrapods, a position known informally as doggy style. The female will hold her tail to the side and allow this if receptive.

If unreceptive she may sit or lie down, snap, move away, or otherwise be uncooperative or not allow mating. The male will often move about as he tries to get a good purchase upon her, and whilst attempting penetration of his penis to the female’s vulva. At this point, the penis is not erect, it is slender and held rigid by a small bone inside, known as the baculum.
When the male achieves penetration, he will often hold tighter and thrust faster, and it is at this point when he is mating that the male’s penis expands. Canine reproduction is different from human sexual intercourse, because human males become erect first, and then enter the female; canine males enter first, then swell and become erect. The male dog has a bulbus glandis, a spherical area of erectile tissue at the base of the penis, which traps the penis inside the female’s vagina during copulation as it becomes engorged with blood. Once the penis is locked into the vagina by the bulbus glandis, the male will usually lift a leg and swing it over the female’s back while turning around.
The two stand with their hind ends touching and the penis locked inside the vagina while ejaculation occurs, decreasing leakage of semen from the vagina. After some time, typically 5 - 20 minutes (but sometimes longer), the bulbus glandis disengorges, allowing the mates to separate. Virgin dogs can become quite distressed at finding themselves unable to separate during their first copulation, and may try to pull away or run. Dog breeders’ websites often suggest it is appropriate for those involved to help calm and settle the mating dogs once this stage is reached, if they show anxiety, through until eventual separation.
Note that similar canine mounting behavior (sometimes with pelvic thrusting) is also used by dominant canines of both sexes. Dominance mounting, with or without thrusting, should not be confused with copulatory mounting, in which the thrusting is short term until a "tie" is achieved.