Well, you're mistaken about the number of planes in a 3d object. I can think of 3; xy, xz and yz. Similarly, in a 4d situation there will be 6 (xy, xz, xa, yz, ya, za).
As for the function, it's to have a complex graph with 2 variables. (As I stated above, one direction for each of real x, imaginary x, real y, imaginary y).
And as to the tesseract...
If a square is the 2d version, and the cube is the 3d version, then the tesseract is the 4d version.
We can view it in 3d (sort of) by perspective, similar to implying a 3d object in 2d. (I've seen one by this method.)
A tesseract is more commonly known as a hypercube.