Sinking and Sourcing Current to and from a PIC24F Output Pin
Even though it's called an output, it can sink or source current:



We are looking at the right hand pair of MOSFETs here (the left hand pair are what an input pin would look like - if the pin can perform both functions, both pairs are connected to the same pin)      

When the output is high the top MOSFET is on (open/passing current) and the bottom MOSFET is off. The pin is effectively connected to the supply voltage (through the MOSFET's ON resistance)
When the output is low, the top MOSFET is off and the bottom MOSFET is on, so the pin is effectively connected to ground. So if you have a e.g. pullup resistor connected between the pin and the supply, the bottom MOSFET will sink the current and keep the voltage at the pin near 0V (assuming the resistor is not too small so the current is higher than the pin is rated for)