Whenever you are using the Internet, your computer or device is identified by a unique address called IP. With this IP, the search engines, websites, software you use will be able to know your actual location. And hackers tries to attack your computer, they will need to lock down your IP first.
When you use the Internet with VPN, you become invisible on the Internet. This is because your IP will change to the IP of the VPN server you connect to. In this way you can achieve:
Anonymous Internet: Your IP has changed and your real IP is hidden.
Unlock country specific websites: When you are on a US VPN, your IP has changed to one of the USA. Websites like Hulu will think you are from the USA even you are actually in China.
Network attack protection: Again hackers cannot do anything without your real IP.
Wi-Fi hotspot Security: Your connection to the VPN server is encrypted so public wifi administrators will not be able to peep into your data.
See also: https://breakwall.net/2012/03/how-vpn-works-a-simple-explanation/