The best explanation you will get is from a medical doctor. They will explain to you how there are multiple sexes. Gender is not biological so there is no biological explanation.
For people who are downvoting me and are either too lazy to talk to a doctor or use Google: Fine, here are some links. Please educate yourselves about simple biology you should have learned in school.
For people who are downvoting me and are either too lazy to talk to a doctor or use Google: Fine, here are some links. Please educate yourselves about simple biology you should have learned in school.
https://www.quora.com/Scientifically-how-many-sexes-genders-...
http://www.nytimes.com/1993/03/12/opinion/how-many-sexes-are...
https://en.wikipedia.org/wiki/Intersex
http://www.who.int/genomics/gender/en/index1.html
https://en.wikipedia.org/wiki/Sex_and_gender_distinction