Meiosis is the process of cell division which reduces the chromosome number by half. The number of chromosome is restored when the two gametes, the egg and sperm, fuse to form a single cell or the zygote.
Meiosis produces four gamete cells.
The gametes produced during meiosis are haploid but not genetically identical. The chromosomes number produced during meiosis is 2n. Each gamete has a unique genetic makeup.
The reasons for the gametes being genetically different are:
1. Crossing over: The point of time for the homologous cross over during meiosis is almost random which allows a different genetic makeup in each cell that is formed through meiosis. More crossing over, hence, allows more versatility of the genetic material.
2. Random orientation of the homologous pairs: the random orientiation during metaphase I allow the formation of gametes in different assortments of the homologous chromosomes.
For example, in a human cell, the random orientation of homologue pairs alone allows for over 8 million different types of possible gametes.
Meiosis in humans is the reason for the production of the human sex cells or the gametes: Sperm in male, and eggs in female. The purpose of meiosis is to produce daughter cells with half chromosome numbers as the parent cells.
Meiosis is divided in nine stages, which are divided in two stages i.e. meosis I and meiosis II :

Before entering meiosis I, a cell must first go through interphase. As in mitosis, the cell grows during G1 phase, copies all of its chromosomes during S phase, and prepares for division during G2 phase.
1. Interphase
The DNA of the cell is copied. This results in the two copies of complete chromosome.
During interphase, microtubules are extended from these centrosomes. Centrosomes are present outside of the nucleus. A cell contains two centrosomes, each contains a pair of centrioles which are very important for the cell division.

2. Prophase I
During this phase the copied chromosomes are condensed and appear in X shaped structures.
Each chromosome contains two sister chromatids that have identical genetic information.
Each chromosome is aligned with its homologous pair so that the two chromosomes are matched at corresponding positions, i.e. the two copies of the same chromosome are together.
A process called recombination or crossing over between the copies of the chromosome takes place at this time. A protein complex called synaptonemal complex helps the homologous pair of the chromosomes to stick together during crossing over. These glued pair where the homologous chromosomes are linked together are called as chiasmata.
At the end of prophase I the chromosomes are released out of the nucleus as the nucleus membrane is dissolved away.
The meiotic spindles are extended.

3. Metaphase I
The spindle fibres begin to capture chromosomes and make them move towards centre of the cell. Each chromosome attaches to microtubules from just one pole of the spindle, and the two homologues of a pair bind to microtubules from opposite poles. So, during metaphase I, homologue pairs—not individual chromosomes—line up at the metaphase plate for separation.
Centrioles are shifted at the opposite poles of the cell having spindle fibres in between them.

4. Anaphase I
The homologues are pulled apart by meiotic spindle and move apart to opposite ends of the cell. The sister chromatids of each chromosome, however, remain attached to one another and don’t come apart.
The sister chromatids stay together till the end of meiosis I.

5. Telophase I
The chromosomes arrive at the opposite poles of the cell.
At each end of the cell there is a full set of chromosomes. The membrane is formed around each set to form two distinct nuclei.
Cytokinesis usually occurs at the same time as telophase I, forming two haploid daughter cells. The single cell is divided into two daughter cells.

Meiosis II is the mitotic division of each haploid cells that were produced during meiosis I.
The different phases of Meiosis II are:
6. ProphaseII
At this stage there are two daughter cells each having a complete set of chromosomes. In each of them the chromosome condenses and forms a X shaped structure.
The nuclear membrane dissolves to release chromosomes. The centriole is duplicated and again the spindle fibres are formed.

7. Metaphase II
The chromosomes line up along the equator of the cell in both the daughter cells.
Centrioles are at the poles in each of the daughter cells.
Spindle fibres attach to each of the sister chromatids.

8. Anaphase II
The sister chromatids are separated and pulled towards opposite poles of the cell by the spindle.
The separated chromatids at this stage are individual chromosomes.

9. Telophase II
Nuclear membrane is formed around each set of the chromosome and chromosomes decondense. The chromosomes complete their move to the opposite poles of the cell.
At each pole of the cell a full set of chromosomes gather together.
A membrane forms around each set of chromosomes to create two new cell nuclei.
This is the last phase of meiosis, however cell division is not complete without another round of cytokinesis.
Once cytokinesis is complete there are four granddaughter cells, each with half a set of chromosomes (haploid):
In males, these four cells are all sperm cells
In females, one of the cells is an egg cell while the other three are polar bodies (small cells that do not develop into eggs).