An easy way to think of how a transistor works is as a hose with a sharp bend that stops the water from going through. The water is the electrons, and when you positively charge the gate, it unbends the hose, letting water flow.