Many dogs don't retract their penises immediately after breeding, known as paraphimosis.
It's not uncommon for a dog to take some time after breeding to retract his penis. This isn't a condition that requires veterinarian help unless it doesn't resolve within an hour or so.
Here are some steps that should be taken when a dog is experiencing paraphimosis:
Give it a little time. I've seen it take up to an hour for a dog to retract.
Keep the dog calm and still: Movement can make the condition worse, so it's important to keep the dog as still as possible.
Apply a cold compress: Applying a cold compress to the area can help to reduce swelling and inflammation and help your dog retract.
Apply a lubricant to help the penis slide back into its sheath.
Contact a veterinarian if this doesn't resolve after an hour or so. Unresolved paraphimosis is a medical emergency and requires prompt treatment.
If you need to go to your veterinarian, she may attempt to manually reduce the penis by gently pushing it back into the prepuce, but in some cases, the swelling may be so severe that the penis cannot be reduced manually and surgery may be necessary. This is RARE.
It is important to note that this condition can cause severe pain and discomfort if your dog can't retract within an hour of a breeding, and if left unresolved, can lead to tissue damage and necrosis of the penis.
Paraphimosis outside of a breeding
Note that post-breeding paraphimosis is different from paraphimosis that occurs at other times. If a dog experiences paraphimosis other than after a breeding that is a serious condition that requires immediate veterinary attention.
In a non-shedding male dog it helps tremendously if you shave the hair around his penis before breeding. The hair impedes retraction.