A VPS is like a dedicated server, you get administrative/root access with the VPS. This allows you to install and configure application or software on the VPS. Before installing any software you should check the system requirements because a VPS package has physical limitations like storage space, memory and cpu. You can upgrade the VPS package if the software demands more server resources.
The VPS can not be used to install and run pirated software, warez sites, child pornography or any illegal stuff.