When talking about PCBs, the number of layers refers to how many etchable layers are present. A "double layer board" may only have three layers (copper, fiberglass, and copper), or upto 7 layers (silkscreen, soldermask, copper, fiberglass, copper, soldermask, silkscreen. See, double layer!). Here are examples of both types of double layer boards (the green one can be anywhere from 2 to 32 layers, we cant know from the photo, our only clue being vias to show that it is multilayer):
source
source
As to why multiple layers exist, in the old days it was a tool that made routing dense boards easier. Today, the number of layers is essential to signal integrity and EMI. Almost any signal coming from a modern microcontroller has a very sharp transition time, and thus needs a closeby "return", which can either be a ground plane (that's one of the most important reasons ground planes are widely used), or it can be a power plane IF it comes from the same power source as the signal (you can run a 5V signal over a 5V plane, but dont do it over a 12V plane).
Where you can run into issues is when you do signal/power/ground/signal. This will work perfectly if all signals stay on the same layer. However, move a signal from layer 1 to 4 and the return path will be broken. All you need to know for now is it would be better to set your PCB layers to signal+power/ground/ground/signal+power.
For more info, set apart 2 hours and watch the best presentation ive seen regarding the topic.