Take a example of multilevel housing society vs individual villa.
In multilevel housing society, There are n numbers of flats (condominium) in the same premise. The resources needed to live in the society such as lift, Garden or Park, Swimming pool, Gymnasium, Sports facilities and club are shared by each flat owners or resident of flats.
Sometimes , there are more than usual number of residents use the facilities at the sametime and in this scenarios some of them have to wait for their turn or may have to adjust as resources are limited and shared with all. You can't customise these facilities according to your own requirement.
However in case of a individually owned villa, You can have your own facilities like gym, swimming pool, your own garden etc. These facilities may be smaller in capacity in comparison with facilities of housing society but it gives to freedom. You don't have to wait. You can customise the facilities as well according to your need. These will have their own identity.
I think now you have fair bit of idea about the difference between shared hosting vs VPS hosting.
If not then lets go ahead.
In Shared hosting, the resources such as physical server, Ip address, CPU, RAM, operating systems etc. are shared with every users or every website hosted on shared hosting. In general, There is no big impact on operating of websites hosted in it. However there are certain scenarios where the resorced may not be adequate (Like sudden high traffic in few websites may impact load speed of all other websites). There are scenarios in which a issue caused by one website may impact all other websites.
In VPS hosting- You decide your own CPU, RAM, Ip addresses etc according to your own website requirement. A kind of dedicated environment virtually created for your need. Hence in general, You are not impacted due to activities of others.