Shared hosting is like you are living in a room with a lot of friends. It means you must fit in the same room and you must split the cost of several things because it is affordable and cheap. However, several individuals are sharing the same space, it means everyone needs to live within a space with restricted resources among them. You will have to use the same things (that sounds a little unhygienic).
Similarly, in a real dedicated server, you will pay for the entire server that is not shared with anyone else. You will get complete control over all services. Unfortunately, it is also the most expensive hosting option and needs some technical expertise to manage. It is commonly used by those who have websites with specific scenarios, most commonly extremely high traffic and tight security requirements.
With VPS, you pay for what you use in the sense that you select a certain amount of bandwidth and storage to be allocated in advance. Scaling involves resizing your resources. But with cloud hosting, you pay for what you use in that your resource levels are not pre-determined, which means unpredictable pricing that tends to be more costly than VPS due to the overhead and complexity involved.
As you can see, a VPS can be the perfect middle ground for many – enough flexibility and resources for those who need more access or control than on a shared server but without the cost of a dedicated server. If you need root access, you can’t get that on a shared server, but you can get it on a VPS. If your site experiences unpredictable swings memory usage, and your host provides it, then the presence of burstable memory will be attractive. And, if you’re a fan of customization, then the fact that you can customize server-level software such as PHP, MySQL, and Apache will perk your interest.  In short, choosing a VPS will allow you to have many of the same characteristics of a dedicated server but in a more affordable and manageable package.