In terms of observable human anatomy it would seem that sex is a simple thing. A male has a penis and testes and produces sperm, while a female has a vagina, uterus, and breasts and menstruates. These simple distinctions have probably always been evident to humans. Note that the information about the female reproductive organs was much less complete than that about the male, because the female organs are less visible. Also much of the extant data have been derived from male sources. Still, it was assumed that when the male put his semen (seed) into the female's vagina there was a possibility that the woman would then proceed to nurture the seed until it grew into a baby.
Although there probably has never been a time when males did not know they had something to do with procreation, if only because the animal examples around them were so obvious, they also knew that not every act of sexual intercourse led to a pregnancy. That is, intercourse might be a necessary cause of pregnancy, but it was not always believed to be sufficient in itself. The reasons why pregnancy did not always occur were fully understood only in the twentieth century. The issue was further complicated by the fact that some males were impotent or sterile and some females did not get pregnant no matter how many times they had intercourse. What was known, moreover, raised further questions and even problems. Sexual intercourse, for example, was a source of pleasure whether or not a pregnancy resulted. Even touching the penis or clitoris could give a pleasurable sensation as could mutual masturbation between two individuals regardless of