What causes an iPhone IP to keep changing when it hits a website repeatedly? My friend's iPhone 4 has a strange behavior. When on 3G, going to an IP detection website, his IP seems to be changing pretty much on every request! His phone is supposedly traveling all over the world at every http request. 

It's not the carrier, because we tried to switch SIM cards and the issue is attached to the phone.

On Wi-Fi it seems to be OK. 

His phone is jailbroken, however I couldn't see anything installed regarding this. But I'm no expert. 

Anyone has seen this before? Is there a known application or setting that may create this? Where should he look?
The IP address will change as you move base stations or your data requests are load balanced by your provider. This is because it is not your IP address but the IP address used by the provider to service the internet request.

It will be the same when on Wifi since your routers external IP address will persist for its connection to the outside world. However if that changed (if you rebooted your router and don't have a statically assigned IP) then you would observe the same behaviour.

These changes should happen over half hour or longer intervals, so if you are seeing changes that are minutes apart, then the traffic is being routed to a service that is anonymizing the source IP and/or potentially being tampered with.

See the tor project for a description of how this works when people want to show up in web server logs as coming from many diverse IP addresses.