This is a much debated topic, and I don't necessarily think we still have a definite answer, except to say that scientific research has identified that both factors are important; it is not just one nor the other that dictates the intelligence of a given person. Of course, your question ties in to a much larger debate in social sciences, the nature/nurture debate, which seeks to discover which of the two factors you have mentioned in your question--our genes or our environment and upbringing--has the biggest impact on us as a person.
Clearly, with intelligence, there is a genetic aspect to what we are capable of. Yet at the same time, studies have shown that if children are malnourished or if their mothers are drug addicts or alcoholics whilst they are a foetus, this can greatly impact their intelligence. Thus I think you need to accept that the answer to this question is something like both/and rather than either/or. Our level of intelligence is a result of our genes and of our environment.
Genes provide the blue print for any characteristic in human being including intelligence level. But this inherited characteristics need to develop and this work done by the environment. intelligence of a person has to develop by one attending school to be taught and to interact with other students. Home also plays a role in developing the IQ of one. Guardians teach their children morals. If a person has a poor environment then he/she becomes dumb like the rest who are around. The interactionist theory states that nature(biological state) and nurture(environment) have to work hand in hand for development. Are you satisfied with this answer?