When you have WIFI, 3G, EDGE, GPRS all available and "ON" on the device, the device will always try to use the most powerful one, the most fastest one. So
WIFI will be use if all networks are available.
3G will be use if there is no WIFI and 3G is there.
EDGE will be use if there is no WIFI no 3G but EDGE available.
GPRS will be use if there is no WIFI, no 3G, no EDGE and but GPRS available.
No internet connection on the device if there is nothing available.
Note that GPRS is the most slower data transfer speed, and WIFI is the faster available ATM.