It happens in the moment.
A TEST OF YOUR TIMING
There's no science involved in the withdrawal method, probably because it pre-dates science as we know it. It simply involves the man removing his penis from the vagina before he climaxes. It requires a lot of self-control and trust, and therefore it can be an unreliable method of contraception.
The withdrawal method involves a lot of control on the part of the man, who must be aware of when he is reaching climax, so he pulls out before ejaculation. Not all sperm are released when a man ejaculates, so even if he pulls out before orgasm, you could still get pregnant. Pre-ejaculate, or 'pre-cum', contains some sperm, and as such your doctor or nurse will likely not recommend it as a method of contraception.
Withdrawal does not protect against sexually transmitted infections.
HOW IT MEASURES UP
Typical use means how well the method works in real life and perfect use means how well a method works under 'perfect' or ideal conditions for example when there is no user error at any time.
NEED ADVICE? SPEAK TO YOUR HEALTHCARE PROFESSIONAL
Seek out an appointment with your doctor or nurse for further support that meets your needs.