Although there are a variety of theories and concepts about your question, most sources agree that personality is influenced significantly by two primary factors and a number of subfactors. Just like in Human Growth and Development, genetics play a large part in developing our personalities. Some children demonstrate similar temperaments, outlooks and even facial expressions that are a part of their parental heritage even if they have never met their biological parents.
In addition to genetics, the environmental influences of our home, families and culture also play a significant part of our personalties. Traits and factors of personality can be encouraged and reinforced through exposure to these influences.
Aside from these two main points, there are literally dozens of other thoughts on what causes our personalities to develop. For example, Freud felt our personalties were established through unconscious drives that were met or unmet mainly through the influences of our parents. Adler felt that a need to maintain our social interests and to avoid inferiority drove our personalties. He also felt that our birth order was extremely significant in this regard.
XXXXX XXXXX said that personalties tend to offset dichotomous traits that exist naturally in human nature. For example, if you believe that you are passive, parts of your personalty will offset this in your environment and cause you to seek out passive experiences that fit in with your view of yourself.
What one factor affects personalities more than any other? That appears to be your own genetic history. Many of our traits are embedded in our genotype and surface at the moment of conception. This is true in animals as well as people. If you ask any dog breeder what the traits of a cocker spaniel are compared to a Rottweiler, they will refer to the dog's genetic history. The same is true of people. Who you are mostly seems influenced by your DNA, chromosomes and genes.
I hope this helps you,