As I understand it, they deposit a layer of oxide on the first layer, pattern it, and preferentially etch in order to allow selective interconnection to the existing layer, then deposit fresh layers of silicon on top to do it all over again.
Chemical vapor deposition or sputtering is how they do deposition. Put wafer in vacuum chamber, suck out all gas, then make the desired compound form by zapping targets or cooking exotic gases like silane.
Sometimes, as with top-end solar cells, they'll even change the material from layer to layer.