How do men just not cum during sex?

Not trying to be derogatory, I genuinely don't know the answer. I have seen this trope a lot in porn and have always wondered about it. How does it actually work physically to not cum when you are very close? I assume this is different for penises and clitorises, and I can't say that I have ever tried to stop an orgasm from happening, but I don't feel personally like I could. Can you penis-having folk actually stop yourselves from cumming during sex? Is it a feat of mental fortitude or do you just have to dial the stimulation back? Is the orgasm better or worse after making yourself wait?