VPNs can do lots.
Firstly, it changes your IP Address, so when you connect to a website, or server, the VPN gives their IP from one of their servers instead of your actual IP Address. It also allows you access websites that are blocked in your country, and bypass a service that has your real IP Address blacklisted.
When on public WiFi, it also protects you from hack attempts. It also encrypts your connection. And no, it will not fully protect you from getting ddosed and all that other stuff. If the person has your real IP address, they can still lag your connection even with your VPN activated, but if someone gets your VPN ip address, it won't do anything to your connection, other than lag the VPN servers (I think)
You can as well change your location, so you appear to be coming from another country
2 good VPNs I recommend are Hidemyass and Zenmate, I use Zenmate, but I might use hidemyass at some point, hidemyass is one of the most popular VPN services out there. Some VPNs also allow you to use their service on multiple devices, like tablets, smartphones, computers, and even game consoles somehow, but yeah, that's how a VPN works, and it semi-protects you from ddos attacks, only if the person grabs your VPN ip instead of your real IP
VPN also stands for Virtual Private Network