How can I measure battery voltage with my MCU?
The PIC24F etc. is a 3.3 V device, so you can't apply the LiPo's voltage directly to an input pin.  

You can use an ADC (Analog-to-Digital Converter) channel, or a built-in comparator. The ADC will give you the actual voltage at any time, the comparator only good/no good.  

Like I said you can't apply the battery's voltage directly: it's too high. Use a resistor divider to scale the 4.2 V down to 3.3 V. A 10 k&Omega; resistor in series with a 33 k&Omega; will do fine. The divider will draw a constant current of 100 &micro;A, which isn't much, but you don't want this 24/7. You can use a logic level gate P-MOSFET as a high-side switch to enable or disable the divider, like the Si2303.