Our chromosomes come in sets of 23 and we inherit one set from each parent. All of your mother's cells also had 46 chromosomes. There is one important exception though. There are some animals and plants that CAN produce both eggs and sperm. They are called hermaphrodites .
Snails are a good example.
When they mate the two snails swap their sperm that then fertilise eggs in both of them. When an egg is fertilised by a sperm the two sets of 23 make 46 again, but the chromosomes, and therefore the genes, are a mixture from both parents. The fertilised egg or zygote then divides billions of times to produce more cells that will eventually form you, all having the same 46 chromosomes. This type of cell division is called mitosis . Before each division the cell makes an identical copy of each chromosome so that each new cell also has the same set of chromosomes, therefore the same genetic information.