It is individual. Generally a dog is looking for pressure on the knot. In normal mating the humping is to get the penis into the female dog where it is captured by the knot and then the humping ceases.
Human sex is much more based on repeated movement. Canine sex is not.
The dogs become stuck because the female dog has a special ring muscle in the vagina which holds the not. At this point further movement is not possible. So they turn 180 tail to tail and remain in this position until the erection ceases or the female relaxes her grasp. Knot inflation begins almost as soon as the dog begins to thrust.
During this the female is massaging the penis and both the dogs apply a certain amount of pressure on the knot by pulling against each other. Male dogs expect pressure on the back side of the knot and when this pressure is gone, it is a signal, that sex is over.
What you often see in porn where dogs mount a woman 15 times and fail is a demonstration of the lack of knowledge of canine sexual anatomy.
The human vagina is shaped differently and does not have the strong ring muscle to hold the knot. The male dog can not get the pressure he is expecting and fails to mount. If you use your hand to hold the knot, it is much more successful.
Dismounting is also completely natural expected behavior once the knot is inflated. This is the moment where the 180 turn would happen. But the human vagina can not hold the knot which is why in the absolute majority of porn you will see fully erect dogs slip out with full knot with no effort at all.
Holding the knot is the key.
The only possibility of knotting with a human is when there is a large size difference between the vagina and the knot.