Sunset is the exact time the upper disk of the sun is at the horizon, whereas dusk is when the center of the sun is 18 degrees below the horizon, according to the National Institute of Standards and Technology. The hazy twilight in between sunset and dusk is caused by the scattering of sunlight in the upper atmosphere that gives the horizon a light blue appearance.
Sunset also refers to the end stages of any period, such as the sunset years of a life. Dusk is also the dark part of twilight or partial darkness of an area. Both words come from Middle English terms.
Dusk and twilight also occur in the morning before sunrise. Twilight also refers to the time of night when the western edge of the sky gets darker until the night sky is the same homogeneous color from one horizon to the other. Another definition for the word twilight is a later or terminal period, such as the twilight of the British Empire's power in the 1800s.
Astronomical twilight occurs when the sun is 12 to 18 degrees below the horizon. Nautical twilight is when the sun is 6 to 12 degrees below the horizon, and civil twilight is from sunset until the sun is six degrees below the edge of the earth.