In order to upgrade your device's OS, you first need to connect it to a WiFi network. This is required because of the large amount of data that will be downloaded in case of an update. To start the update process, go to Menu > Settings > About phone > Software Update > Check for Updates. Your device will automatically search and install the latest updates available.
The only way to upgrade your device's OS to 4.0 is by installing an unofficial version of the OS like Cyanogenmod. This is not advised, but you can use Google to find out more.