Taller individuals are more intelligent than shorter individuals, and men just happen to be taller than women. In fact, once we control for height, women on average are more intelligent than men. It still remains true, however, that, without controlling for height or anything else, if you simply compare men and women, men on average are slightly more intelligent than women.
Behind the averages is a more complex story. Boys’ test scores are much more dispersed (here and here). In fact, boys outscore girls at the top of the distribution, and they underperform at the bottom. Across the OECD countries, 6 out of 10 underachievers—“those who fail to meet the baseline standard of proficiency across the tests”—are boys. Boys are more likely than girls to repeat a grade, less likely to attend college, and less likely to persist in attaining a degree if they do (here and here). Despite this higher performance by women, female college students continue to be under-represented in technical fields like engineering and computer science.
This higher average performance by girls masks important variations across individual subjects (as demonstrated in the figure below). While girls consistently score higher in reading and writing across the assessments, boys tend to perform better on assessments in mathematics and science in the majority of countries in which these tests—and others, such as the PASEQ and SACMEQ and the Early Childhood Longitudinal Study—are administered. The Middle East seems to be the only region for which the mathematics advantage for boys does not hold. This male advantage in mathematics is otherwise so pervasive, in fact, that a gender gap is observed even when analyzing the results of twins of different genders in Chile.