@LazyMe10 You don’t inherit your height from one parent or the other. Height is polygenic. In other words, it is determined by multiple genes from both parents. In this case, at least 20 genes are involved. (There is also some influence from the environment. Malnutrition can prevent someone from attaining their full potential height.)
@ARE_you_kidding_me @Darth_Algar “Sexual dimorphism” is the name of this phenomenon, not an explanation for it. Saying that men are on average taller than women because of sexual dimorphism is no more helpful than saying that men are on average taller because they are different sizes. It just a restatement.
@RedDeerGuy1 The answer to your question has to do with mating practices and sexual competition. There are two ways of eliminating sexual competition: radical polyamory (everyone has sex with everyone) and strict monogamy (no one ever has more than one sexual partner). In species that exhibit these behaviors, males and females have very similar body sizes. Strict monogamy can even lead to slightly larger females, since they are less likely to die during childbirth (and are therefore more likely to have surviving offspring).
But human beings do not practice either radical polyamory or strict monogamy. But when there is neither free access to sexual partners nor strict limitation to a single sex partner, we find ourselves in a situation where sexual access is not equally distributed. This leads to sexual competition, and size is an advantage when competing for sexual access (especially in the past when the competition was more likely to involve a physical confrontation). In human beings, it was historically the males competing for females. So it was the males who needed to be larger. Larger males had more children, and so the next generation was more likely to have larger males. The size of females was not as strictly controlled by evolutionary factors, so it remained roughly the same.
(If you’re interested, Jared Diamond’s book The Third Chimpanzee has a whole chapter on this, complete with many excellent references to previous work on the subject done by anthropologists and biologists.)