Sex is when two gametes, such as an egg and a sperm, fuse to form one individual cell. Each gamete contains genetic material that will form half the genetic make-up of the offspring. Sex evolved around 1 billion years ago, though the causes for its initial evolution remain open to much debate.
Differences can occur between the sexes, such as behaviour or morphology, which is called sexual dimorphism. Even the gametes often show differences in what is called anisogamy, which is the presence of male and female specific gametes, i.e. the sperm and the egg. Males by definition produce small motile gametes and females a larger non-motile gamete containing nutrients.
Sex-determination occurs in a number of different patterns: the XY system, where females are XX and males are XY, is found mainly in mammals; the ZW system, mainly found in birds, has ZW females and ZZ males; and the single-chromosome X0 system, mainly in insects, where females are XX and males are merely X.