Actually I think the main advantage of a vpn is to make your location appear to be somewhere you are not. There are websites which are only available to viewers certain countries, like the BBC websites that are only available if you are in Great Britain. So a vpn with a node there would allow you access that a person in your country would not normally have.
As far as security, each vpn has it own policy as to how much information it gathers and how long it retains it. Most vpns only have your real ip address recorded during the time you are connected since you need to have an account with the vpn company and since they don't retain any logs, once you disconnect its like you never connected at all. You need to investigate each vpns policies for yourself or you can search for articles on various websites which compares all the vpns and their policies. There may be exceptions to those policies for national security or judicial purposes, so you'll want to note those. As far as viruses, you won't get any help there and the only way hacking might be less likely is that the hacker wouldn't know precisely who you are and when you were going to connect to the vpn.