2-dimensional Mandelbrot set generated by UltraFractal v. 2.04 (F. Slijkerman, www.ultrafractal.com)

The regular Mandelbrot set in 2 dimensions is produced by the complex iteration of z2+c. We hold a value of c constant, begin with z=0, and iterate the function. If the point does not iterate to infinity, then the point is part of the Mandelbrot set. If the point iterates to infinity, then it is hence not part of the set.
In practice, the way one calculates whether a point will iterate to infinity is to check the distance of the iterated point z to the origin while iterating to a prescribed number of iterations. If this distance is greater than 2, then the point will iterate to infinity, and one assigns a color to the point c on the computer screen that corresponds to the number of iterations needed to make that distance greater than 2. If after the prescribed number of iterations the distance of z to the origin is still less than 2, one assumes the point is in the Mandelbrot set and conventionally colors c black. The number of iterations used corresponds to the amount of detail required and how much one zooms in onto the set.
In exploring the 4-dimensional Mandelbrot set,
one uses the same technique, but instead of a quadratic, one iterates a
cubic equation.