I need answers

Basically what happens after a boy cums inside you, like ik some sperm goes up to the egg & all that but does it come out again? Like would it leak out if u couldn't get pregnant ( if your on the pill or something) just wandering