What are the main causes of whether a person becomes introverted or extraverted?
Heritability estimates of Extraversion (and other Big 5 factors)

The introduction section of  Loehlin et al (1998) provides a narrative review of heritability estimates of big 5 personality traits (i.e., one of which is extraversion).
A brief extract gives a flavour of some of the research that has been conducted:


  A recent heritability analysis of the Big Five dimensions as measured
  by the Revised NEO Personality Inventory of Costa and McCrae (1992)
  used a total of 660 monozygotic (MZ) pairs and 380 dizygotic (DZ)
  pairs from pooled Canadian and German twin samples (Jang, McCrae,
  Angleitner, Riemann, &amp; Livesley, 1998). For all five traits a simple
  model involving only additive genes and nonshared environment fit the
  data. Estimates for the heritabilities of factor scales for [Extraversion, Agreeableness, Conscientiousness,
  Neuroticism, and Openness] were .50, .48, .49, .49, and .48, respectively. These
  estimates are obviously very similar—in partic- ular, the heritability
  of Agreeableness is quite in line with the rest.


They also mention other twin studies, with heritability estimates for Extraversion, Agreeableness, Conscientiousness, Neuroticism, and Openness respectively as:

                       E    A    C    N    O
Waller (1999):        .49  .33  .46  .42  .58
Riemann et al (1997):  60  .57  .71  .61  .81


Thus, in summary, it seems that such estimates for the heritability of extraversion are around 50%.

Side Point


While inventories like the Myer-Briggs Type Inventory often categorise individuals, into categories, I find a continuous approach to personality traits provides a more accurate description of an individual. Using such an approach, people have a score on an extraversion dimension that is roughly normally distributed (or at least continuously distributed) in the population.


Limitations


I realise this only partially answers your question. It doesn't discuss the dynamic environmental-genetic interactions that cause personality traits , nor does it take a critical perspective on issues related to the measurement of extraversion, and the estimation issues related to heritability. Hopefully, it is a useful starting point.


References


Jang, K. L., McCrae, R. R., Angleitner, A., Riemann, R., &amp; Livesley, W. J. (1998). Heritability of facet-level traits in a cross-cultural twin sample: Support for a hierarchical model of personality. Journal of Personality and Social Psychology, 74, 1556–1565.
Loehlin, J.C. and McCrae, R.R. and Costa, P.T. and John, O.P. (1998). Heritabilities of common and measure-specific components of the Big Five personality factors. Journal of Research in Personality, 32, 4, 431-453. FREE PDF
Riemann, R., Angleitner, A, &amp; Strelau, J. (1997). Genetic and environmental influences on
personality: A study of twins reared together using the self- and peer report NEO-FFI
scales. Journal of Personality, 65, 449–475.
Waller, N. G. (1999). Evaluating the structure of personality. In C. R. Cloninger (Ed.), Personality and psychopathology (pages 155-197). Washington, D.C.: American Psychiatric Press. FREE PDF