Look up ADCON1 register in the datasheet. to find it faster, make sure bookmarks are on and scroll do the the A/D section. this section will tell you lots of stuff about how the pic does the A/D. the registers are always listed at the end of the section. BTW, within the first few paragraphs it explains how to turn the Analog input on and off to use the pin as Digital or analog. Any way, look up ADCON1 and read which bits need to be on or off, 0 or 1, set or clear.

PWM is not an analog output.