A fractal is just a graph of a complex function that looks pretty. A guy named Mandelbrot figured out the first computer fractal, "z = z^2 + c," and it looked pretty cool, but fractals have been around way before him. Clouds, trees, any self repeating image is a fractal (Julia sets are the only true computer fractals). If you've ever seen Sierpinski's triangle (a triangle divided into four smaller triangles, which are divided again, and again...) then you've seen a fractal. Computer fractals work much the same way, but with real and imaginary axes, that's how they're able to get results with such "complex" (ha ha, a pun, heh... heheh... heh... woooo...) formulas. Coloring is just based on how "quickly" values of the input progress to infinities.