The best explanations for the Flynn effect appear to be improved nutrition and lessened childhood disease. Something like 80% of a babies metabolic output goes into brain function (20% for an adult). So any severe sickness or deficiencies in diet at a young age will always produce a negative impact on brain development (creating a bulge on stupid side of bell curve). The West has mostly wiped out serious childhood disease and famine creating a significant boost compared to places where things like Malaria and poor food and nutritional deficiencies still kill or negatively impact the development of huge numbers of babies.
Also intelligence is correlated weakly with brain size, and bigger people have bigger brains (anecdotally I found it very noticeable in STEM subjects at University how many tall and therefore bigger-brained men and women there were). The average size of humans has increased markedly during the last 100 years with better food availability (eg 5-10cm taller in China in last 30 years).
The genetically determined (Nature over Nurture) aspect of intelligence is contrary to the ideal of the improvable man - but unfortunately it does turn out that genetics dominates Intelligence, with something like .75 correlation between twins even if raised separately. IQ statistics and correlations are very strong and very clear and can be used to predict (with accuracy) a wide range of things about the behaviours and attainments of genetically differentiated groups groups in our society.
This does not go down well in politics or the humanities and has been decried by apologists such as Stephen J Gould. It is OK to recognise genetic differences if they are positive, such as hugely superior athletic ability of West Africans that dominate most sports they participate in, but do not mention average academic outcomes - or find factors other than genetics to blame.
Some of the interesting results of this strong tendency towards genetic determination of IQ are that you get regression to mean (smart parents tend to have slightly dumber children, but stupid parents tend to have slightly smarter children) leading to identifiable trends such as smart first generation immigrants who managed to get to the West then having children who are less talented. And also that your chances of being a genius are massively higher if you come from certain cold climate populations where survival appears to have hinged on non-violent economic competition (han chinese, ashkenazic jew), and massively lower if you come from other hot-climate gene-pools that appear to have placed greater emphasis on disease resistance and athletic/verbal/physical ability in benign climates with frequent warefare. This results in a very large difference of something like 2-3 standard deviations between the Ashkanazic Jews and some of the hot climate gene pools. Which is why given the nature of the tails of the bell-curve the Ashkanazic's are so massively over-represented in elite attainments (nobels etc) and hot climate gene-pools almost invisible. Again this is not popular or politically correct but is nonetheless real and is demonstrates the reality of IQ or 'G' even without needing to devise a test for it - relative differences in group IQ and the bell curve can be elegantly inferred simply from the proportions of individuals in various professions.
So sadly it appears that genes do determine IQ to a large extent, but selective breeding can change average IQ by up to 15 points within a few generations (ashkenazic jews had nearly identical genes to the local population wherever they lived, and yet were on average almost a standard deviation smarter). If we wanted to we could probably eliminate IQ differences between groups within a generation or two using Gatacca style technology.