Ok thanks everyone, I think I'm beginning to understand. You all have been very helpful.
I was flipping through the Bible today and I found this weird part, why would God put this in the Bible?
Gensis 38:8-10 - Then Judah said to Onan, “Go in to your brother’s wife, and perform your duty as a brother-in-law to her, and raise up offspring for your brother.” Onan knew that the offspring would not be his; so when he went in to his brother’s wife, he wasted his seed on the ground in order not to give offspring to his brother. But what he did was displeasing in the sight of the LORD; so He took his life also.