How does the iPhone handle connection priority? Suppose I'm in the range of a wifi network and I check my email on my iPhone.

Will it try to use the wifi network first and only if that fails attempt to connect to 3G? Or will it always use 3G (with the charges that carries) regardless of other mediums?

Is it automatic? Do I have to manually disable 3G connection if I want it to use wifi?
The iPhone will always try to connect to the wifi if it is in range. If it already knows how to connect it will do so automatically. If it does not know it will notify you that there are wifi networks available.  

But to come back to the situation you described:
If it is already connected to the wifi it will use that for all data even if it is also connected to a 3G network.