A virtual private server (VPS) is a slice of a real server, rented by the hour or the month, that behaves like a computer of its own, with its own operating system. Only the customer who rents it can log in to it. It is the basic product of every developer cloud.
How can one server become many? A large physical server in a data centre may have 64 processor cores and 256 GB of memory. A program called a hypervisor divides these among many virtual machines. Each virtual machine is given a fixed number of cores, a fixed amount of memory and its own disk space. Each one runs its own operating system, usually Linux. One customer cannot see or reach another customer's virtual machine, even though both run on the same physical server.
"Private" means that the slice is reserved for one customer. This is the difference from shared web hosting. On shared hosting, hundreds of websites run inside one operating system, and each customer can only upload files through a control panel. On a VPS, the customer has full control of the operating system, called root access. They can install any software, change any setting and run any program.
Take, for example, a freelance developer in Indore who has built a billing web app. Forty small traders use it to make their GST invoices. She rents a VPS with 2 cores, 4 GB of memory and an 80 GB disk. She chooses Ubuntu Linux, and the server is ready in under a minute. She logs in from her laptop with SSH. SSH is a program that opens a secure command line on a remote computer, protected by a key file instead of a password. She installs a web server, the app and its database.
The VPS costs about ₹3 an hour, up to roughly ₹2,000 a month. In the last week before the monthly GST return is due, the traders make three times as many invoices as usual, and the app slows down. So she resizes the VPS to 4 cores and 8 GB of memory, which costs about twice as much. The resize needs one restart of a minute or two. After the rush, she resizes it back. She pays the higher price only for those days.
A VPS also brings work. The renter must install security updates, take backups and repair the server if the app stops. Large companies buy an enterprise Linux subscription for tested updates and someone to call. A company whose app is written in Java may also need a supported Java runtime.
A VPS is not the same as a container. A container shares the operating system of the machine it runs on, and holds only one app with what it needs. A VPS has a whole operating system of its own. Many teams run containers inside their virtual servers, as the page on containers and Kubernetes explains.