In a one word response, mitosis.
In an explanation: Before the replication process, an ordinary sex cell contains only has 23 chromosomes. That is half the amount of a normal cell. So when the cells join together they make up the 46 pairs. Then through replication and division(i.e mitosis), the cells are copied to form in short a tiny human. You then forever live with the same amount of chromosomes in your normal cells.