For the vast majority of people, they are either male or female based upon the presence, or lack of, dangly bits.
For the less than 1% of people (special little snowflakes included), there is this handly little flowchart.
Click on image for full size.
Pro-tip: Gender ≠ Your mood.