All living organisms face the same problem: their DNA is much longer than their cells. If you took the DNA from a single human cell and stretched it all out end-to-end, it would be about 1 meter long! Not only do the cells have to fit all that DNA in there, they have to be able to access it - to transcribe it, to copy it, etc.
Prokaryotes and eukaryotes solve these problems in different ways (as you might expect: remember, one of the ways prokaryotes and eukaryotes are different is that prokaryotic cells don't have a nucleus.) Prokaryotes solve the problem by supercoiling their DNA: imagine taking a piece of rope, pinning down one end and then twisting the other. Eventually the rope starts wrapping around itself; and as you continue to add twists, the wrapping gets tighter and the end-to-end length gets shorter. Prokaryotes have a set of enzymes that supercoil DNA to pack it tightly, and another set that selectively uncoils it when it needs to be accessed or copied. Many of these proteins are present only in prokaryotes and not eukaryotes, which makes them a good target for antibiotics.
Eukaryotes solve the problem differently, wrapping their DNA around tetrameric protein cores called histones into a 10 nm-wide fibre that, close up, looks like "beads on a string."
These chromatin fibers are further squeezed together into higher-order structures, the sum of which is called chromatin: the gooey mass of DNA and proteins that together hold each cell's genetic information intact. Far from being random, these higher-order structures form something akin to a fractal globule, a self-organizing structure that achieves tight packing without becoming knotted. Oh, and it's quite visually striking too:
Two things to note. First, the fact that the DNA reproducibly self-organizes at this level explains the phenomenon of DNA transregulatory elements, where a spot on the genome regulates gene expression at loci many millions of bases away: just because they're distant in linear "genome" space, doesn't mean that they're far away in actual space.
Second, genome architecture provides another layer of regulation for gene control. Some parts of the DNA hairball are open, accessible for transcription (these genes are "on"), and some parts of the DNA hairball are closed, compacted, inaccessible (these genes are "off"). What I find particularly wacky, and what got me thinking about this in the first place, is that these structural changes seem directly related to cell type. That is, the DNA in a skin cell and a liver cell may have exactly the same sequence, the same genetic "program", but because the DNA is arranged differently different parts of the program are "running."
And yes, this means that if I could take a skin cell and change the parts of the DNA that are on and off, I might be able to make it into a liver cell, or a brain cell, or a heart cell. This is one of the hottest areas of regenerative medicine research right now. Soon, if you get hepatitis and need a new liver, you won't have to wait for someone to die and take theirs -- you'll donate some skin cells (or some fat cells) and three months later you'll have a new liver (well, some liver-like tissue) waiting for you in a jar.
This is also (one of) the reason(s) why biomedical science didn't end when the human genome was sequenced. (Not that it's finished, even a decade after it was declared finished.) Not only do we still not know what all that DNA does; there are several layers of regulation that determine whether a piece of genome is active or not, and sorting out all those relationships will provide graduate projects for a long time yet.