Thanks on great answers.
If someone of you little bit more experienced would start to defining layer stack, and you want to have some certain impedance, how would you start?
From which parameters?
Well, you'd start by looking at all of the impedance targets you need to hit, and how many layers you need to be able to route the board. If your project is low volume or cost sensitive, you will probably look at your PCB fabricator's standard stackups, which should include the spacing and dielectric constant of the insulating layers. From the dielectric constant and insulation thickness you can calculate the required track widths (and spacings for differential pairs) for the impedances you need. You need each controlled impedance layer to be paired with one or two plane layers, so you would need to define which layers will be planes and which signal, and usually about half of the layers end up as planes. Different insulating layers may be different thicknesses (especially on 4/6 layer boards), so the required track widths may be different for different layer pairs, which you will need to account for, depending on how big the difference is and how strict your impedance requirements are.
If you have a really complicated board, you might need to define a custom stackup. There's a bit of art to this, since you're balancing the technical needs as well as cost, and you may have to account for other things, like blind/buried vias, which require specific fabrication processes and affect how your can move signals around on the board. You might also need to use a less common dielectric material, particularly for RF or really sensitive circuitry, and this will affect what stackup options you have and how much it all costs.
Your original question about why core and prepreg materials are used comes down to how the board will be fabricated. The copper layers need to be exposed in order to etch them, so multilayer boards are made up from multiple cores, which are made of a dielectric material with copper foil on one or two sides. Each core has its copper etched, and then the cores are stacked with prepreg between them, and the whole stack is pressed until the prepreg fuses with the cores and you end up with a solid multilayer stack. Layers can also be added by applying copper foil to prepreg, which is common for the outer layers on multilayer stackups. On a basic stackup the drilling and through-plating is done at the end, so all cores get drilled at once, but on more complicated boards with blind/buried vias there may be drill/plating steps on individual cores or on partial stacks of cores before the final stack is assembled. So if you need blind/buried vias between particular layers, this will affect the order in which the stackup will be fabricated, and which dielectric layers are core versus prepreg.