iPhone 3.0 is available for download.
Just click on image above and follow instructions from Apple to upgrade.
or use links after the fold to download official firmware files.
iPhone 3GS: <—- not like you can use it today, but just in case
Read this if you are planning to jailbreak unlock your iPhone after upgrade: