The 2N2222 is a bipolar junction transistor (BJT) and has a collector, base, and emitter terminals. A BJT requires a base current to turn on.
A field-effect transistor (FET) has a drain, gate and source. It requires a gate voltage to turn on.
The base-emitter voltage of a BJT is about 0.65V when the transistor is on. To turn the transistor fully on as a switch, the base current should be about 1/10 of the collector current, so you need to know the motor current. For a maximum current of 25mA from the PIC, the collector current should be 250mA max (that's with all the PIC current going through R2 to the base and no R3). You also need to know the PIC output voltage when it is sourcing 25mA to calculate the value of R2.
If your motor draws more than 250mA you either need to add another stage of gain, or use a logic level MOSFET which can carry the current. (A MOSFET requires no gate current, just gate voltage).