You have to picture your 8x8x8 cube as a 8 separate 8x8 leds squares.
Let's go to the basics and work on just a single 8x8 square of white leds.
You can put these in 8 columns of 8 leds and connect the anodes together, so now if you send voltage through a resistor (to limit current) all leds in column would light up if you connect the cathodes to ground. Now naturally, if you limit the current to let's say 15 mA, if you connect one cathode to ground one led lights up and gets 15 mA, if you connect 2 cathodes to ground, each led gets 7.5 mA, if you connect all 8 cathodes to ground you get about 2 mA through each led. This is not good.
So your solution is to only light up one led from a column at a time.
If you connect the cathode of first led to ground, wait a few ms, disconnect, connect second cathode to ground, wait a few ms, and repeat for all 8 leds in column, your eyes would see all 8 leds lit up at the same time.. That's persistence of vision.
You can also make one led appear dimmer or brighter by changing how often the led is turned on or off. For example, if you keep each led lit up for 1 ms, in your 8 led column, each led is lit up 1000 ms / 8 = 125 times a second. If you want a led in a column to appear dimmer, you can just make it light up.. let's say 70 times a second.
Now, you can take the 8 columns of leds and tie the cathodes of each row together. Now instead of 8 anodes and 64 separate cathodes you have 8 anodes and 8 cathodes.
Your microcontroller now has to decide for each row in a column what led is supposed to light, send power to all columns where led is supposed to be on, but only connect the cathode of a particular row to ground.
A transistor array like ULN2803A has 8 darlington transistors and a resistor in front of each transistor in the package. Each transistor can sink 0.5A to ground. When your microcontroller sends power to the base of a transistor in the package, that transistor turns on and connects the cathode of a row to ground. You're only going to have the current of a led, times 8 going through one transistor of the array (0.015mA x 8 = 0.12A).
So with 16 i/o pins from a microcontroller, you can use 8 pins to send power to leds (or to a transistor+base resistor which turns on and sends power to each column) and 8 pins to turn on the transistors in the transistor array, one at a time for each column.
You can further reduce the number of pins used by using shift registers. To use a shift register you only need 2-3 pins and you can link shift registers together.
So you can use shift register to get 8 outputs and instead of connecting the column leds (or base resistor of the transistor that powers leds) directly to 8 pins of the microcontroller , connect them directly to the shift register. Same with the transistor array at the cathodes.
Now your microcontroller only needs 6 pins, 3 for each shift register. The microcontroller shifts 8 bits to first shift register to select columns that have to light up, then shifts 8 bits to select which row is connected to ground. Then repeat eight times, one for each row.
Once you have this done, you can just multiply it for the depth of your cube, eight identical squares. as you can link shift registers together, you have eight shift registers for the columns, eight shift registers for the cathodes of each row in the cube, eight transistor arrays, one for each square. This way you can light up eight rows at a time, one from each square.
You can further multiplex things by connecting all eight rows cathodes from each square together, but now you can no longer light up 8 rows at a time, one from each square.
You now have to connect to ground whole plane (rows 1 from all 8 squares for example), turn on leds for square 1, wait, turn off, turn on leds for square 2, wait, turn off... and so on until you get to square 8. Then disconnect plane and connect to ground next plane (rows 2 from all 8 squares) and repeat.
But with this method, if each led lights up for 1ms, each row will light up for 1 ms, so between the time one row lights and then gets to light up again, about 63 ms pass.
Here's a very ugly drawing i made in paint on how to do the 8x8 :