In general, once exposed to certain environmental cues, epigenetic changes cause developing individuals to become either male or female.
Typically, exposure to certain environmental factors triggers epigenetic changes that determine the sex of a developing individual.