Difference between Mosfet and Voltage Regulator?
MOSFETs and voltage regulators often come in similar-looking packages and usually have 3 pins each, but their functions are different.

A voltage regulator takes in a high voltage, like 12 V, and puts out a lower voltage, like 5 V. The canonical example of a voltage regulator is the LM7805. They tend to be fairly inefficient (some of the power is lost as heat).

A MOSFET is a semiconductor switch. It varies the resistance between two pins in response to a voltage on a third pin. Inside the MOSFET, the voltage on the third pin (the gate) pulls electrons into a narrow path between the other two pins (the source and drain), allowing electricity to flow. Here's a decent diagram.