How is a person's sexuality determined?
Human sexuality turns out to be quite complex and has a strong biological component to it, as well as cultural.
Much has been learned about human sexuality over the past 50 years. Four components are often identified in determining your sexuality: 1) whether you have male or female genitals; 2) who you are attracted to sexually (i.e. males or females); 3) how you "feel" internally (i.e whether you feel like a male or female), and 4) your outward expression of your sexuality (e.g. how you dress, behave, etc). The last 3 at least can have some culturally derived components too.
In most people, if they are female, for example, they have female genitals, are attracted to males, feel and think female in their brains, and outwardly will dress and behave as females in however their culture defines female dress.
But we now know that there are various combinations of these four that manifest in various kinds of gay and transgender people. For example, a transgender male with male genitals might internally feel like a female, be attracted to males sexually, and outwardly want to dress like a woman or perhaps even a man.
So, the way we think and our sexual drive is partially determined by our biology, but also seems to have a cultural component to it as well.