The 1 kΩ base resistor limits the base current:
IB = (3.3 V − 0.7 V) ÷ 1 kΩ = 2.6 mA
For the transistor to switch fully on (saturate), design for a base current of about a tenth of the load current, so 2.6 mA reliably switches loads up to roughly 26 mA. For a bigger load, lower the base resistor (390 Ω gives about 6.7 mA, enough for ~65 mA) or use a logic-level MOSFET, which needs no steady gate current.
A relay or motor is an inductive load: add a diode (1N4007) across it, cathode to +12V, or the turn-off spike can destroy the transistor.