Yes, in theory, an iPhone could get a virus. For those wondering how this could be, the answer is rather simple. A virus is a program that infiltrates your PC (or your Mac, for those who think you’re immune) and exploits security holes resulting in a number of problems as well as hijacking your computer entirely.
A virus has to be downloaded in one form or another, so those that are at the greatest risk are those people who have jailbroken their iPhones. The reason is that you’re now downloading in uncharted territory – for the most part, the apps are clean, but unlike the official app store, there’s no way to be sure that the phone isn’t silently turning against you.
The reality is that unlike businesses, hackers like leaving no stone unturned. If there’s a chance that a hacker can program a virus for the iPhone that somehow makes it worth his while, it’s not going to be long before there’s an iPhone virus.