Hi,
The easiest way is to use a NPN transistor or a N-channel MOSFET and switch the lowside of the solenoid. Ie +12V -> Solenoid -> Switch -> GND.
Drive the transistor with an output of the PIC. Don't forget to put a diode in reverse across the solenoid to clamp the inductive kickback when it's turned off.

Google low side transistor switch and you should find plenty of information.

/Henrik.