The programmer making the image chooses the colors for areas of the graph that satisfy certain mathematical conditions. Points that are part of the Mandelbrot set are almost always colored black, though the individual programmer makes the final choice.
To determine if a point on the complex plane is part of the Mandelbrot set, it is plugged in for c, a complex number, in the formula z(subscript(n+1)) = z(subscript(n))^2 + c. This formula is iterative, meaning each term in the sequence depends on the one before it. To start, z(subscript(0)) = 0 is used. If the sequence is bounded, meaning there is a number above which it cannot go, then that value for c is a part of the Mandelbrot set.
Early images showed nothing outside the black area of points representing the Mandelbrot set. A later innovation was coloring the area outside according to certain conditions. Mathematicians have proven that once a c value causes the Mandelbrot sequence to exceed sqrt(5), the sequence cannot be bounded and is not part of the Mandelbrot set. An interesting question, then, is how many iterations it took to produce that result. The programmer chooses a color for each number of repetitions that value of c took to become too big, and these are the colors you see outside the black areas.
One interesting phenomenon that becomes apparent upon adding color to the set is that not just the set itself, but the colored areas outside the set exhibit self-similarity. These areas, too, have distinct repeating complex structures, which don't resemble the main body of the Mandelbrot set at all.