You could start by reading "Intelligence: Knowns and Unknowns". This is a consensus article based on many of the world's leading researchers on intelligence.
Empirical research suggests that variations in intelligence is largely hereditary.
Specifically estimates of heritability of intelligence at adulthood based on monozygotic twin samples who were reared appart suggests correlations of around .68 to .78 (see p.85 of the above article).
Of course, these estimates are typically based on samples growing up in the same country at a similar point in time. These estimates would be smaller if for example, monozygotic twins could be separated so that one twin grew up in a stone age society and another grew up in developed society with good education and health care.
Intelligence is something that develops over time. We can contrast acquired knowledge and skills (often called crystallised intelligence) with more abstract capacities (often called fluid intelligence). In particular, crystallised intelligence is predicted to improve more with schooling and general exposure to cultural learning experiences.
A lot more could be said about all this, but I recommend you just read the article, see below. It discusses these issue in accessible language and much greater depth: