If you buy the phone on its own you will not be able to get internet right away (apart from wifi). You will need to setup your APN details to know where to get internet from. The different types of internet are as follows:
Originally Posted by Zenith
G - GPRS (32-40kbps)
E - EDGE (~96kbps)
3G - 3rd Generation (128-320kbps)
H - HSDPA (1.2Mbps-7.2Mbps)
GPRS and EDGE are both second generation
3G and HSDPA are both third generation
To get third generation internet you will need a modern sim card, the older ones are simply not able to do it. You can get a free sim card from your carrier with the same number etc which will take affect in 24 hours. If your sim card is too old, the "Use only 2G networks" setting in Android will automatically tick its self.
You can have multiple APN settings stored on your phone but only one activated at a time. Therefore if you want to use internet and MMS at the same time you need to enter their details into the same APN. If the APN you have entered is valid it will allow you to select it.
APN settings vary from PAYG to contract and also from different carriers. The following is for O2 contract, but you can find any carrier settings with Google:
This is what i have been using and Ive seen it work from GPRS to 3G (Android 2.1), people in o2 said HSDP will work if I'm in a good area. When you enter these there is no need to restart your phone but you might have to wait a few minutes for it to kick in. I have also heard of a lot more username/password combinations working. Your phone will automatically chose the fastest internet for you.