DNS is what translates
www.websitenamehere.com into useable IP addresses the computer actually understands ... so your country's DNS servers return an invalid ip address for youtube.com ... and hence you get no access to the website, by changing your DNS servers to something outside of your country you are using a Server that when asked where do I find youtube.com it gives you the correct answer and hence you then can get to the correct location ....
DNS is like asking for directions to someone's house ... unless you know exactly how to get there you can't get there ... and if there is faulty information in the database, then it sends you to the wrong house. If a DNS Server does not know where something is located, then it asks another server higher in the chain until it gets an answer ... it just doesn't have any way to know really if it is getting the right answer or the wrong one.