Can I get a virus on my smartphone?

While there are possibilities, there is no need to panic. It’s highly unlikely to affect you. The reasons are various. Firstly, many smartphones are based on the Android system, which is written in the Linux language and is a very secure system anyway. Though some viruses do exist for Linux, they are rare.
The most likely risk to a smartphone with regard to ‘infection’ is that the user gets careless about which Apps they download. Some apps, for example, may offer cheap text messages but in fact charge premium rates instead, or try to access your Contact list and send spa m messages to your friends. This is not technically a ‘virus’ but it is the kind of infection risk that is possible right now. Being careful about the apps you choose to allow into your phone is the best defense.
The iPhone has equally lower risks since the Apple system is based on Unix/Linux language and so the risks are not great. Most risks would involve a memory corruption which could mean losing your stored data to clean it. However again that is possible but not probable. All iPhone apps are approved by Apple so the chances are slight. Also if you use iTunes with your iPhone you can back up all your data easily.
Most risks then, are linked to spyware or malware which are more nuisance value than viral. An infection from these may mean an increase in spam and overcharging apps. So some caution is needed.
Many of the main stream anti-virus companies are offering anti-virus software for smartphones but do you need it? What would an anti-virus for a smartphone do? Mainly watch if the apps you download try to access your contact list. For example why would something like a currency convertor need to do that? It wouldn’t, so such activity would produce an alert that an infection was likely. If the risks are so low then, why are companies producing anti-virus software? —A cynical view is that they are offering protection from something so remotely possible that it’s just a money making scheme. An alternative view is that they are being cautious. There are some free phone anti-virus programs, also available. If it makes you feel better, go ahead and get the protection but be prepared for loss of battery life and performance as an offset.
Of course this is all subject to change as the market increases and virus programmers target new markets. If one system becomes dominant in the marketplace it could tempt virus writers to put their energies into producing a real threat. Right now they would have to write the code for each type of phone operating system and it’s simply not lucrative enough. YET. For now though, there are bigger things to worry about.