They get their otterness, and some how that essential coding gets played out. But gender, on the other hand, is constructed. That's why stockings and wigs were considered masculine in the 18th century and feminine in the 20th. Gender is a system of communication about roles and possibilities that we use between humans to connect with each other. Animals who don't communicate symbolicaly don't have gender.
Some people go one way and claim it's all coded sex roles, that sex and gender are the same thing.
Others go the other way and claim that sex roles are irelevant, that it's all gender an all constructed. It turns out that you can't, because humans are social animals, and that early socialization, as abritary and constructed as it is is crucial for humans to develop. For humans, the social is natural. Sex and sex roles, sure, but without symbolic communication, I don't think gender is possible.