Almost every human cell contains DNA that, if stretched out, would extend several meters. Packing that length into a nucleus perhaps 1/100,000 of a meter in diameter--and unpacking it so it can be duplicated when the cell divides--is an almost miraculous feat.
In addition, although the details of the packing are not fully understood, it is clear that different parts of the DNA are packed differently, and this packing strongly influences how readily its sequence is transcribed. The packing provides yet another mechanism for regulating gene expression.
To form a nucleosome, DNA wraps almost twice around a group of eight histone proteins, two copies each of H2A (yellow), H2B (red), H3 (blue), and H4 (green). Chemical modifications of the stray tails of the histones affect the packing of nucleosomes with one another and modify transcription of the neighboring DNA. (Higher resolution at the Wikipedia Description Page.)
At the smallest level of organization, the DNA double helix winds around an octet of histone proteins to form what's collectively called a nucleosome. Usually the nucleosomes are quite densely arrayed along the DNA, connected by short linking segments of DNA like "beads on a string."
The nucleosomes tend to jam together as closely as possible. But they form at some DNA sequences more easily than others, due to details of the attraction of different bases to the histones and the need to bend the double helix. They also compete for binding with DNA-binding proteins like transcription factors and the proteins that initiate transcription.
Using the known sequence to model the competition among nucleosomes and between nucleosomes and proteins is a complex statistical-mechanics challenge that has attracted the attention of biophysicists, as discussed in a symposium I covered for the New York Academy of Sciences a couple of years ago.
The exact position matters. The enzyme that transcribes genes, RNA polymerase II, needs access to the DNA, whose the two strands must be temporarily separated to get access to the sequence to copy it. The wrapping of DNA around histones slows both the initiation of transcription and the continued elongation of the RNA transcript.
Still, wrapping around histones is only the first level of DNA packing. The way that the resulting nucleosomes assemble into larger structures is even more important in determining which DNA sections are actively transcribed.