N.B. the source won't show for this post - google "Will using a VPN prevent you from getting hacked through your computer and phone?" to see the original post [since been updated] from QUORA
Whenever something can come from the open internet into or onto your device you can get hacked. Using a VPN only protects the communication between the two points.
Theoritically you would be safe if your device only connected another device and none of the devices communicated with anything else. If just one of those devices can browse the net or receive email, none of the devices are safe.
Most of the time you hack yourself, by installing malware someone tricked you into downloading. Nothing will help with that except education and sometimes a good antivirus.
But if you are in a known insecure environment - on wifi at an airport or a hacker conference - then if you use a secure VPN to tunnel to a safe network and work from there, you will be safer than doing web browsing, email etc. directly from your computer.
It doesn't mean, however, that all your info is secure with VPN as some of the other posters mentioned. The reason is that your data is secure for as long as it's encrypted and becomes vulnerable once it leaves secure channels. So if you're sending something to a person B whose connection is not secure, person B can be hacked and this way a hacker can steal the data you send him/her.
But I'm not sure any of the above applies to VPN in a typical sense. If you're looking to secure your communication from 3rd party spying on you, hackers on public Wi-Fi and similar activities, VPN will guarantee your privacy. Please refer to the Best VPN guide. Some VPN companies also offer advanced security features more anonymity.
Actually VPN hide your orignal IP and provide you a virtual IP so if any one want to enter your system through internet, he see the virtual IP which direct you to the VPN Provider server. This is the reason no one can trace your IP. So it is very hard for anyone to hack you, if you are encrypted by a VPN Software.