How to control a 12v motor with a momentary switch

I'm having a hard time wrapping my head around this. How does simply adding a resistor and mosfet reverse button function?