You'll need to talk to whoever is providing the VPN service, or if you're trying to set one up yourself, you'll need to look through your VPN server's documentation for instructions on how this will work for your iPhone.
Some VPN types (PPTP/Cisco IPsec) can be configured in Settings. Other types require that you download an app to enable and configure them.
There are different types of VPNs offered by different vendors and developers. So there's no one set of instructions on how to do this.
Note that if you're on an actual iPhone 3G, the one from 2008, then chances are VPN support is very limited at this point, if it's supported by most VPNs at all. The iPhone 3G lacked a lot of the cryptographic hardware that they started putting in the 3GS and later models.