Synchronous vs Asynchronous Code
If you take a look at the code above you probably have no problem to identify what is going on. At the beginning we set a variable that depicts the name of the current ruler of Westeros. This is happening now. Now is Cersei Lannister and her name is printed in line 44.
Then we created a function that accepts a name, and when called takes the names and sets it as the new ruler of westeros. Thus after line 53, the ruler changes and the new ruler is 'Danny'.
But it didn't last long because night comes always at the end of the day. Thus after line 57 the new ruler is the night's King!
Now regardless if you are a big game of thrones fan or not, this code is synchronous. It will run sequentially one after the other. Every line must perform it's task and be executed before the next one starts. This kind of operations are called blocking operations or synchronous code.
But what happens if a specific operation takes more time to execute? What if i want to define NOW, who the ruler is going to be after 50 years? Do i define it now, and then wait for 50 years to proceed to the next line? What if i want to send my credentials to a server and want to get a response back with my personal homepage? This operation could take more than 2-3 seconds! Do i have to wait during this time paused and doing nothing? That doesn't look very good in terms of performance, let user's experience apart!