Atoms of dopant materials -- such as boron or arsenic -- are forced into an area by ion bombardment in a process called doping, aand are "activated" by a thermal annealing step. The resist material blocks the dopants from entering any areas where they are not intended to be. After ion implantation, the hardened resist is stripped off, and the process is repeated for other types of dopants implanted in different areas. In subsequent steps, a similar patterning process is used, but the resist acts as an etch mask.
----------------------------------------------------------------------------------------
Next, the gate of the transistor is formed by depositing and patterning a layer of silicon dioxide (which forms the gate oxide) and then a layer of polysilicon, which is then heavily doped. This polysilicon gate acts as a "faucet" to turn the flow of electrons between the source and drain on and off.