PID Example 1

+5V ----- Potentiometer----GND
                |
                \(the middle leg)
                   ------------Analog 0

That should give you an input voltage on the Analog 0 between 0 and 5V. The analogRead returns a value between 0 and 1023. Use a potentiometer with at least 10K, 100K would be fine.

Yes, The PWM control varies between 0 (0% on) and 255 (100% on)