There is more than enough available examples of how to use a PIC's PWM output as a digital to analog converter out there, a simple google search will keep your reading for hours. You simply set a PWM output at the highest possible frequency that will still give it an 8 bit wide duty cycle. Any basic tutorial on a PIC's PWM output abilities will teach you all you need to know.
Also look up "Low pass filter" in wikipedia, The most basic form of it is as I described above, a resistor in series with the output and a capacitor shorted to signal ground. But it depends on how fast you need your voltage to change. You will still always have some ripple (related to the PWM frequency) on the output, but the higher the frequency you use for PWM the easier it is to filter out, especially if you only need the signal to change slowly.