These measures avoid sperms to come in contact with the female egg. Widely these methods and controls are known as 'contraception', a simple effort that prevents the sperm to fertilize female egg.
Traces of facts in history tell us, that humans became aware of birth control only when they understood that sex was connected to pregnancy.