Connect one end of the switch to VCC connect the other end to a PIC pin and to a resistor to ground, 1-10k depending on your power limits (1k if wasting power isn't a problem 10k if it is) While the switch is closed (the magnet is close) the pic pin that has the resistor to ground will read VCC and you'll get a little bit of current through the resistor, when the magnet moves away the resistor will ground the PIC pin, and it will read 0 volts.
You can do the the reverse as well if you want; Connect the previously VCC side to ground and connect the other side with the resistor to VCC (and the pic pin) and the logic will reverse itself.
How you could state how such a switch operates without being able to understand how to connect it to a micro controller makes me slightly question the chances of the project succeeding.