What's the purpose of both of the resistors in this motor driver circuit?
The 180 resistor limits the current into/out of the capacitive MOSFET gate.
The 10 kOhm makes sure the gate is pulled down to 0 when it's not powered high.
The 180ohm limits the current of the Arduino pin into/out of the capacitive MOSFET gate.
The 10k makes sure the gate is pulled down during boot time,
when the pin is still in an undefined input state.
I think it's all explained on the webpage where this circuit comes from.
The input on a MOSFET looks like a capacitor so the input impedance when the capacitance is not charged is very low. In fact it looks like a dead short for a small amount of time while the capacitance charges. Like @Railroader says the resistor limits the current that can flow during that short time.
Pins on the Arduino default to inputs on reset. An input that is floating has no defined state, high or low. So the gate of the MOSFET can also float, the gate is not under control. The MOSFET can turn on. The 10K resistor holds the pin in a known state (in this case, low), keeping the MOSFET off until the software can change the pin to an output pin and take control of the MOSFET gate.