As the sun progresses through the sky during the day it starts low to the horizon moves over head until again dropping down to the horizon at sunset. If the skies are clear around midday when the sky is overhead shadows are very short and the light very harsh. This light is very unflattering as it creates dark harsh shadows. When the sun is approaching (or leaving) the horizon though shadows are long and the light has a lovely golden orange glow hence giving the name Golden Hour which appears directly after sunrise and before sunset.
To get scientific the reason is that at midday the sun light passes directly through the atmosphere from above taking the shortest route. At Sunset the light travels through a greater depth of atmosphere the intensity is reduced and more ‘indirect’ light can be seen. The best way to describe indirect light is that if you put a light on in another room it will still dimly light up a next door room even if the light source can not be visibly seen. This happens as the light bounces off walls into the other room, but each time it bounces it looses some intensity. The same happens at sunset, rather than mainly seeing the direct light we experience light that has bounced (off the atmosphere and the earth!) to become softer.
The length of the golden hour is affected by a few things. It occurs roughly between when the sun is at the horizon, until it is at an altitude of 10 degrees. At the equator the sun will reach this altitude very quickly and often in less than an hour. Whereas for certain times of the year near the poles when the sun only just rises above the horizon the golden hour can last all day. Here in the UK it varies but in summer it lasts nearer to 90 minutes each end of the day. Another vital element is weather, if there is solid cloud in the sky there will be no golden hour glow.
I personally try and schedule as many of my photoshoots as possible to coincide with the golden hour so to take advantage of the glorious light. Doing so also means avoiding the risk of harsh midday light. Yes there may not be golden hour sun for every shoot but the light should be workable whatever the weather as long as it is not raining.