Genes are segments of deoxyribonucleic acid (DNA) and contain the code for a specific protein that functions in one or more types of cells in the body. Chromosomes are structures within cells that contain human genes. Genes are found in chromosomes, which are located mainly in the cell nucleus. One chromosome contains hundreds to thousands of genes. Each human cell contains 23 pairs of chromosomes.