Organisms of many species are specialized into male and female varieties, each known as a sex ,  with some falling in between being intersex . Sexual reproduction involves the combining and mixing of genetic traits: specialized cells known as gametes combine to form offspring that inherit traits from each parent. Gametes can be identical in form and function (known as isogamy ), but in many cases an asymmetry has evolved such that two sex-specific types of gametes (heterogametes) exist (known as anisogamy ).
Among humans and other mammals , males typically carry XY chromosomes , whereas females typically carry XX chromosomes, which are a part of the XY sex-determination system . Other animals have a sex-determination system as well, such as the ZW sex-determination system in birds, and the X0 sex-determination system in insects.
The gametes produced by an organism are determined by its sex: males produce male gametes (spermatozoa, or sperm , in animals; pollen in plants) while females produce female gametes ( ova , or egg cells); individual organisms which produce both male and female gametes are termed hermaphroditic . Frequently, physical differences are associated with the different sexes of an organism; these sexual dimorphisms can reflect the different reproductive pressures the sexes experience. For instance, mate choice and sexual selection can accelerate the evolution of physical differences between the sexes.
One of the basic properties of life is reproduction, the capacity to generate new individuals, and sex is an aspect of this process. Life has evolved from simple stages to more complex ones, and so have the reproduction mechanisms. Initially the reproduction was a replicating process that consists in producing new individuals that contain the same genetic information as the original or parent individual. This mode of reproduction is called asexual , and it is still used by many species, particularly unicellular, but it is also very common in multicellular organisms. In sexual reproduction, the genetic material of the offspring comes from two different individuals. As sexual reproduction developed by way of a long process of evolution, intermediates exist. Bacteria, for instance, reproduce asexually, but undergo a process by which a part of the genetic material of an individual (donor) is transferred to an other (recipient).
Disregarding intermediates, the basic distinction between asexual and sexual reproduction is the way in which the genetic material is processed. Typically, prior to an asexual division, a cell duplicates its genetic information content, and then divides. This process of cell division is called mitosis . In sexual reproduction, there are special kinds of cells that divide without prior duplication of its genetic material, in a process named meiosis . The resulting cells are called gametes , and contain only half the genetic material of the parent cells. These gametes are the cells that are prepared for the sexual reproduction of the organism. Sex comprises the arrangements that enable sexual reproduction, and has evolved alongside the reproduction system, starting with similar gametes (isogamy) and progressing to systems that have different gamete types, such as those involving a large female gamete (ovum) and a small male gamete (sperm).
In complex organisms, the sex organs are the parts that are involved in the production and exchange of gametes in sexual reproduction. Many species, particularly animals, have sexual specialization, and their populations are divided into male and female individuals. Conversely, there are also species in which there is no sexual specialization, and the same individuals both contain masculine and feminine reproductive organs, and they are called hermaphrodites . This is very frequent in plants.
Sexual reproduction first probably evolved about a billion years ago within ancestral single-celled eukaryotes .  The reason for the evolution of sex, and the reason(s) it has survived to the present, are still matters of debate. Some of the many plausible theories include: that sex creates variation among offspring, sex helps in the spread of advantageous traits, that sex helps in the removal of disadvantageous traits, and that sex facilitates repair of germ-line DNA.
Sexual reproduction is a process specific to eukaryotes , organisms whose cells contain a nucleus and mitochondria. In addition to animals, plants, and fungi, other eukaryotes (e.g. the malaria parasite) also engage in sexual reproduction. Some bacteria use conjugation to transfer genetic material between cells; while not the same as sexual reproduction, this also results in the mixture of genetic traits.
The defining characteristic of sexual reproduction in eukaryotes is the difference between the gametes and the binary nature of fertilization. Multiplicity of gamete types within a species would still be considered a form of sexual reproduction. However, no third gamete is known in multicellular animals.  
While the evolution of sex dates to the prokaryote or early eukaryote stage,  the origin of chromosomal sex determination may have been fairly early in eukaryotes (see Evolution of anisogamy ). The ZW sex-determination system is shared by birds , some fish and some crustaceans . XY sex determination is used by most mammals, but also some insects, and plants ( Silene latifolia ). X0 sex-determination is found in certain insects .
No genes are shared between the avian ZW and mammal XY chromosomes,  and from a comparison between chicken and human, the Z chromosome appeared similar to the autosomal chromosome 9 in human, rather than X or Y, suggesting that the ZW and XY sex-determination systems do not share an origin, but that the sex chromosomes are derived from autosomal chromosomes of the common ancestor of birds and mammals. A paper from 2004 compared the chicken Z chromosome with platypus X chromosomes and suggested that the two systems are related. 
Sexual reproduction in eukaryotes is a process whereby organisms form offspring that combine genetic traits from both parents. Chromosomes are passed on from one generation to the next in this process. Each cell in the offspring has half the chromosomes of the mother and half of the father.  Genetic traits are contained within the deoxyribonucleic acid (DNA) of chromosomes —by combining one of each type of chromosomes from each parent, an organism is formed containing a doubled set of chromosomes. This double-chromosome stage is called " diploid ", while the single-chromosome stage is " haploid ". Diploid organisms can, in turn, form haploid cells ( gametes ) that randomly contain one of each of the chromosome pairs, via meiosis .  Meiosis also involves a stage of chromosomal crossover , in which regions of DNA are exchanged between matched types of chromosomes, to form a new pair of mixed chromosomes. Crossing over and fertilization (the recombining of single sets of chromosomes to make a new diploid) result in the new organism containing a different set of genetic traits from either parent.
In many organisms, the haploid stage has been reduced to just gametes specialized to recombine and form a new diploid organism; in others, the gametes are capable of undergoing cell division to produce multicellular haploid organisms. In either case, gametes may be externally similar, particularly in size ( isogamy ), or may have evolved an asymmetry such that the gametes are different in size and other aspects ( anisogamy ).  By convention, the larger gamete (called an ovum , or egg cell) is considered female, while the smaller gamete (called a spermatozoon, or sperm cell) is considered male. An individual that produces exclusively large gametes is female, and one that produces exclusively small gametes is male. An individual that produces both types of gametes is a hermaphrodite ; in some cases hermaphrodites are able to self-fertilize and produce offspring on their own, without a second organism. 
Most sexually reproducing animals spend their lives as diploid organisms, with the haploid stage reduced to single cell gametes.  The gametes of animals have male and female forms— spermatozoa and egg cells. These gametes combine to form embryos which develop into a new organism.
The male gamete, a spermatozoon (produced within a testicle ), is a small cell containing a single long flagellum which propels it.  Spermatozoa are extremely reduced cells, lacking many cellular components that would be necessary for embryonic development. They are specialized for motility, seeking out an egg cell and fusing with it in a process called fertilization .
Female gametes are egg cells (produced within ovaries ), large immobile cells that contain the nutrients and cellular components necessary for a developing embryo.  Egg cells are often associated with other cells which support the development of the embryo, forming an egg . In mammals, the fertilized embryo instead develops within the female, receiving nutrition directly from its mother.
Animals are usually mobile and seek out a partner of the opposite sex for mating . Animals which live in the water can mate using external fertilization , where the eggs and sperm are released into and combine within the surrounding water.  Most animals that live outside of water, however, must transfer sperm from male to female to achieve internal fertilization .
In most birds, both excretion and reproduction is done through a single posterior opening, called the cloaca —male and female birds touch cloaca to transfer sperm, a process called "cloacal kissing".  In many other terrestrial animals, males use specialized sex organs to assist the transport of sperm—these male sex organs are called intromittent organs . In humans and other mammals this male organ is the penis , which enters the female reproductive tract (called the vagina ) to achieve insemination —a process called sexual intercourse . The penis contains a tube through which semen (a fluid containing sperm) travels. In female mammals the vagina connects with the uterus , an organ which directly supports the development of a fertilized embryo within (a process called gestation ).
Because of their motility, animal sexual behavior can involve coercive sex. Traumatic insemination , for example, is used by some insect species to inseminate females through a wound in the abdominal cavity—a process detrimental to the female's health.
Like animals, plants have developed specialized male and female gametes.  Within seed plants, male gametes are contained within hard coats, forming pollen . The female gametes of plants are contained within ovules ; once fertilized by pollen these form seeds which, like eggs, contain the nutrients necessary for the development of the embryonic plant.
Many plants have flowers and these are the sexual organs of those plants. Flowers are usually hermaphroditic, producing both male and female gametes. The female parts, in the center of a flower, are the pistils , each unit consisting of a carpel , a style and a stigma . One or more of these reproductive units may be merged to form a single compound pistil . Within the carpels are ovules which develop into seeds after fertilization. The male parts of the flower are the stamens : these consist of long filaments arranged between the pistil and the petals that produce pollen in anthers at their tips. When a pollen grain lands upon the stigma on top of a carpel's style, it germinates to produce a pollen tube that grows down through the tissues of the style into the carpel, where it delivers male gamete nuclei to fertilize an ovule that eventually develops into a seed.
In pines and other conifers the sex organs are conifer cones and have male and female forms. The more familiar female cones are typically more durable, containing ovules within them. Male cones are smaller and produce pollen which is transported by wind to land in female cones. As with flowers, seeds form within the female cone after pollination.
Because plants are immobile, they depend upon passive methods for transporting pollen grains to other plants. Many plants, including conifers and grasses, produce lightweight pollen which is carried by wind to neighboring plants. Other plants have heavier, sticky pollen that is specialized for transportation by insects . The plants attract these insects or larger animals such as humming birds and bats with nectar-containing flowers. These animals transport the pollen as they move to other flowers, which also contain female reproductive organs, resulting in pollination .
Most fungi reproduce sexually, having both a haploid and diploid stage in their life cycles. These fungi are typically isogamous , lacking male and female specialization: haploid fungi grow into contact with each other and then fuse their cells. In some of these cases the fusion is asymmetric, and the cell which donates only a nucleus (and not accompanying cellular material) could arguably be considered "male".
Some fungi, including baker's yeast , have mating types that create a duality similar to male and female roles. Yeast with the same mating type will not fuse with each other to form diploid cells, only with yeast carrying the other mating type. 
Fungi produce mushrooms as part of their sexual reproduction. Within the mushroom diploid cells are formed, later dividing into haploid spores —the height of the mushroom aids the dispersal of these sexually produced offspring.
The most basic sexual system is one in which all organisms are hermaphrodites , producing both male and female gametes— this is true of some animals (e.g. snails) and the majority of flowering plants. In many cases, however, specialization of sex has evolved such that some organisms produce only male or only female gametes. The biological cause for an organism developing into one sex or the other is called sex determination.
In the majority of species with sex specialization, organisms are either male (producing only male gametes) or female (producing only female gametes). Exceptions are common—for example, the roundworm C. elegans has an hermaphrodite and a male sex (a system called androdioecy ).
Sometimes an organism's development is intermediate between male and female, a condition called intersex . Sometimes intersex individuals are called "hermaphrodite"; but, unlike biological hermaphrodites, intersex individuals are unusual cases and are not typically fertile in both male and female aspects.
In genetic sex-determination systems, an organism's sex is determined by the genome it inherits. Genetic sex-determination usually depends on asymmetrically inherited sex chromosomes which carry genetic features that influence development ; sex may be determined either by the presence of a sex chromosome or by how many the organism has. Genetic sex-determination, because it is determined by chromosome assortment, usually results in a 1:1 ratio of male and female offspring.
Humans and other mammals have an XY sex-determination system : the Y chromosome carries factors responsible for triggering male development. The "default sex," in the absence of a Y chromosome, is female-like. Thus, XX mammals are female and XY are male. In humans, biological sex is determined by five factors present at birth: the presence or absence of a Y chromosome (which alone determines the individual's genetic sex ), the type of gonads , the sex hormones , the internal reproductive anatomy (such as the uterus in females), and the external genitalia. 
XY sex determination is found in other organisms, including the common fruit fly and some plants. In some cases, including in the fruit fly, it is the number of X chromosomes that determines sex rather than the presence of a Y chromosome (see below).
In birds , which have a ZW sex-determination system , the opposite is true: the W chromosome carries factors responsible for female development, and default development is male. In this case ZZ individuals are male and ZW are female. The majority of butterflies and moths also have a ZW sex-determination system. In both XY and ZW sex determination systems, the sex chromosome carrying the critical factors is often significantly smaller, carrying little more than the genes necessary for triggering the development of a given sex. 
Many insects use a sex determination system based on the number of sex chromosomes. This is called X0 sex-determination —the 0 indicates the absence of the sex chromosome. All other chromosomes in these organisms are diploid, but organisms may inherit one or two X chromosomes. In field crickets , for example, insects with a single X chromosome develop as male, while those with two develop as female. In the nematode C. elegans most worms are self-fertilizing XX hermaphrodites, but occasionally abnormalities in chromosome inheritance regularly give rise to individuals with only one X chromosome—these X0 individuals are fertile males (and half their offspring are male). 
Other insects, including honey bees and ants , use a haplodiploid sex-determination system . In this case diploid individuals are generally female, and haploid individuals (which develop from unfertilized eggs) are male. This sex-determination system results in highly biased sex ratios , as the sex of offspring is determined by fertilization rather than the assortment of chromosomes during meiosis.
For many species, sex is not determined by inherited traits, but instead by environmental factors experienced during development or later in life. Many reptiles have temperature-dependent sex determination : the temperature embryos experience during their development determines the sex of the organism. In some turtles , for example, males are produced at lower incubation temperatures than females; this difference in critical temperatures can be as little as 1–2 °C.
Many fish change sex over the course of their lifespan, a phenomenon called sequential hermaphroditism . In clownfish , smaller fish are male, and the dominant and largest fish in a group becomes female. In many wrasses the opposite is true—most fish are initially female and become male when they reach a certain size. Sequential hermaphrodites may produce both types of gametes over the course of their lifetime, but at any given point they are either female or male.
In some ferns the default sex is hermaphrodite, but ferns which grow in soil that has previously supported hermaphrodites are influenced by residual hormones to instead develop as male.
Many animals and some plants have differences between the male and female sexes in size and appearance, a phenomenon called sexual dimorphism . Sex differences in humans include, generally, a larger size and more body hair in men; women have breasts, wider hips, and a higher body fat percentage. In other species, the differences may be more extreme, such as differences in coloration or bodyweight.
Sexual dimorphisms in animals are often associated with sexual selection – the competition between individuals of one sex to mate with the opposite sex. Antlers in male deer, for example, are used in combat between males to win reproductive access to female deer. In many cases the male of a species is larger than the female. Mammal species with extreme sexual size dimorphism tend to have highly polygynous mating systems—presumably due to selection for success in competition with other males—such as the elephant seals . Other examples demonstrate that it is the preference of females that drive sexual dimorphism, such as in the case of the stalk-eyed fly .
Other animals, including most insects and many fish, have larger females. This may be associated with the cost of producing egg cells, which requires more nutrition than producing sperm—larger females are able to produce more eggs. For example, female southern black widow spiders are typically twice as long as the males.  Occasionally this dimorphism is extreme, with males reduced to living as parasites dependent on the female, such as in the anglerfish . Some plant species also exhibit dimorphism in which the females are significantly larger than the males, such as in the moss Dicranum and the liverwort Sphaerocarpos . There is some evidence that, in these genera, the dimorphism may be tied to a sex chromosome, or to chemical signalling from females.
In birds, males often have a more colourful appearance and may have features (like the long tail of male peacocks) that would seem to put the organism at a disadvantage (e.g. bright colors would seem to make a bird more visible to predators). One proposed explanation for this is the handicap principle . This hypothesis says that, by demonstrating he can survive with such handicaps, the male is advertising his genetic fitness to females—traits that will benefit daughters as well, who will not be encumbered with such handicaps.