hi.
1.for the one of the port line,you should connect a npn or pnp transistor that will act as a switch.
2.to the collector you connect a 12v relay that will control ac supply for a fan,a bul or any other ac supplied device(220v).
3.for buzzer also this circuit works.
try to find relay circuit &connect accordingly.
pandit
Be carefull to noise.....protect your pic. sometimes inductive loads as relay or motor make pic reset randomly. you can use optoisolators and bypass capacitors to prevent disturbs. I had a lot of problems switching relays ..... I solved using 10nF capacitors near power input PIC's pins. and 10nF parallel with 10uF electrolitic Cap between Emitter and collector on NPN.