The chip is formed from a silicon die. Regions are doped with impurities to form the transistors. A special type of silicon called polysilicon is put on top to form the transistor gates. Two layers of metal wiring are put on top to connect everything.
Wiring up the transistors in different ways produces different gates. Here, 6 transistors form a 3-input NAND gate. Metal wires provide the inputs and the output. The transistors at the top are wired in parallel, the bottom ones in series.