It is not advisable to separate dogs tied together because serious injury can occur. It is normal and natural for dogs to tie after mating and to be stuck together. The tie does not always occur, but when it does, it may last for as long as 30 minutes.
The tie is caused by the base of the male's penis swelling up and the female's vagina clamping down on the swollen penis. Any attempt to physically pull the dogs apart is likely to cause damage. It is best to try to keep the dogs as calm as possible and to let the tie resolve naturally. Usually, the male swings his leg over the female's back so that they remain tied by their ends with their heads facing away from each other.
The dogs have already bred by the time the tie occurs, so trying to separate them does not prevent a possible pregnancy. The evolutionary role of the tie is unclear, but it is probably a mechanism whereby the male prevents the female from immediately breeding with another male, which allows time for his sperm to fertilize the eggs. Unless female dogs are confined closely during their heat, it is not uncommon for them to mate with multiple males and to produce litters fathered by more than one dog.