DNA sequences are incredibly long, but they take up very little space within a cell. This feat is accomplished through tightly-controlled DNA condensation.
The first step of DNA condensation involves a class of proteins called histones. DNA molecules are negatively charged due to their sugar-phosphate backbones, and histones are positively charged due to their high concentration of positively-charged amino acids (lysine, arginine, and histidine). Due to their complementary charges, the histones act as spools around which the DNA strands wind. This forms a structure described as beads-on-a-string that is then further condensed to form chromosomes. Because of this, the chromosomal material is referred to as chromatin: not DNA alone, but a combination of DNA and protein.