I did psychology at AS Level, so maybe I can help! Or maybe not...hehe.
Personality is a mixture of nature and nurture, nature being the way you just happen to be, and nurture being the environment you are brought up in, and how you are brought up. I don't think it's as simple or...as medical, as saying that it's a mixture of chemicals and genetic code, but I don't believe it's just a case of "luck". Personality defines who you are, and what you are; happy, sad, outgoing, insular, optimistic, pessimistic...
It's a complex mixture of behavioral, temperamental, emotional and mental attributes, it's made up of experiences you have and the people around you, but I don't think it's as simple as the Type Theories which suggest that there are a limited number of personality types. People might have similar personalities, but it is something that makes every person an individual.
I don't think we'll ever be able to accurately understand or define "personality"; I don't believe there is only one particular definition. It's like trying to define what a soul is...you can point out the individual characteristics (morality etc), but you just can't sum it up. I think it transcends the human mind...
Reading that back, that didn't actually give you an answer, did it? Haha.