Genes are segments of DNA that code for proteins, which are essential for cellular functions. Chromosomes, found within the nucleus of cells, are long strands of DNA that contain many genes. Humans typically have 46 chromosomes, arranged in 23 pairs, with one set inherited from each parent.