The males penis will swell inside the females vagina during the mating.
This will cause them to get stuck.
It is completely normal for dogs to get stuck together after mating and you should not attempt to divide them.
If you don't want them to mate you should have had enough time to try separating them before.