A virtual private server, although virtually private, is a shared resource and hence not as customizable as a dedicated server. A dedicated server on the other hand, is customizable and provides a lot more freedom and flexibility. But it also presents itself as a more costly option than a VPS.
How different are they and which is more preferable?
VPS is shared in terms of resources like space, CPU time and downtime. But certain resources used by one user are not shared by the rest of them and generally, a sufficiently large portion is allocated to each user to cater to individual needs. In a dedicated server, you can engage all the resources available on it. And it is more secure since nobody else will have access to it.
The performance will always be better on a dedicated server owing to being a devoted server.
While most sites and mid sized businesses can run on a VPS, when your site starts using more memory and CPU time, it is a hint for you to upgrade. It means you need more resources to handle the traffic to your site. The other side of the coin being that if any other user on the VPS is utilizing more CPU space and time, your site also gets slower. This will lead to performance issues and slower response times.
In a dedicated server, you have the freedom of installing sofware specifically required for your website to run. And it also results in faster loading times. It also provides you an arena to experiment and try out different options within your site. Most hosting service providers offer a smooth transition from a VPS to a dedicated server. So, if you are not sure how much resources your website might require, it is always better to start off with a VPS and them transition to a dedicated server as and when the need arises.
With more freedom comes more situations where you can mess up. One wrong script or bug can bring down the whole site if you are not careful. For users who would like to keep it safe and who are not very familiar with the working, it is always better to get a hired resource to take care of your hosting control or opt for a service provider that gives you a graphical interface which reduces the risk of goof ups.
But it would also depend on the size of your site and traffic. If the site consists of 3-4 pages and is expecting less traffic, it is always better to start off with the shared hosting services. And it does not make sense to not use your server resource optimally after paying for it. Once you are ready to scale up, however, start looking at a VPS.
This provides more freedom and resources. For highest performance levels, a dedicated server is the best option and will provide optimal use of resources for a heavy site.