Linear output voltage using a potentiometer
Put 5V on one outer pin and 0V on the other outer pin. The middle pin (the wiper) gives you what you want. 






Now this only works when you draw no current from the output so, if you wish to have a circuit that can provide a few mA for a load you'll need to buffer the wiper connection (say) with an op-amp.