The two sexes of the nematode Caenorhabditis elegans are the self-fertile hermaphrodite (essentially a female with a mixed germ line) and the male, and these differ extensively in anatomy, physiology, and behavior. At hatching, C. elegans larvae of each sex are nearly indistinguishable, differing mainly in the sex-specific death of a handful of neurons. After birth, however, a number of blast cells undergo radically different lineages and differentiation programs in the two sexes, leading to adults in which about one-third of cells are overtly dimorphic. The first C. elegans mutants causing discordance between genetic and phenotypic sex were isolated more than 30 years ago. Since then much progress has been made in uncovering the chromosomal elements and downstream regulatory pathways that control sex determination and sexual differentiation in the worm. The primary signal for sex determination is the ratio of X chromosomes to sets of autosomes, with hermaphrodites normally having two X chromosomes (XX) and males one (XO). The X:A signal is exquisitely dose-sensitive and operates via a group of X-linked regulators acting in opposition to a group of autosomal regulators that compete for the control of the master sex regulator xol-1. The activity of xol-1 coordinately regulates the formation of an active X chromosome dosage compensation complex and the activity of a sex determination regulatory cascade. The sex determination pathway globally controls all sexually dimorphic features by conferring sex specificity on downstream regulatory modules, largely via the action of TRA-1, a Ci/GLI family transcription factor with high activity in hermaphrodites and low activity in males. Much of this regulation involves the imposition of sex-specific activity on general developmental regulators in specific cell lineages. Recent work has answered long-standing questions about the molecular mechanisms controlling the sex determination pathway and shown that some C. elegans sexual regulators have counterparts regulating sexual development in other phyla.