Shared hosting is where you share the server with many other websites. Could be 10,000 or more websites and if one website starts using a lot of resources then it can take your website down with it.
With a dedicated server you're the only one hosting your website on the dedicated server and not sharing it with any other peoples websites.
All the resources are allocated to your website only and no other website can affect your websites performance or the server.
Dedicated servers are usually only need though when your website outgrows shared hosting and is getting a lot of website traffic such 3,000 or more daily unique visitors.