VPS hosting is like that you are living in a flat while shared hosting is like living in a PG. As in PG, if you are living there, you have to share everything, As the same in the way shared hosting has the resources to be shared among the server. In VPS, Resources are shared but it is like living in a flat in which the main door is common but there is a separate door that gives your privacy.
As this is the main difference between VPS & Shared hosting