Your iPhone 3G, which is now four years old, cannot update to the latest iOS version. It cannot update over-the-air unless it already has iOS 5. So you will have to update using iTunes.
iTunes will show your device (assuming you're using iTunes 11) once you've clicked the iPhone's button in the upper right once the iPhone is connected. You can then do "Check for Updates" on the iPhone's summary tab on the right side.