Here’s a nucleosome: DNA (tan) wrapped around a histone octamer (blue), the way it is compacted and stored in cells, like thread around a spool. This structure was determined by X-ray crystallography.
You can’t see it here, but the eight histone proteins that make up the octamer fit together precisely and bind to particular sequences in the DNA. Histones hold tighter to some sequences. In addition, the histone tails (like the one in the lower left) can be modified to make octamers interact with nearby octamers, further compacting the DNA. In this way, histones determine whether particular genes in the DNA are available for use. (This is known as epigenetics.)