refraction
Because air is slightly more optically dense than a vacuum, when sunlight passes from the vacuum of space into our atmosphere, it bends slightly towards the normal. When the sun is below the horizon and thus not visible on a direct line, the light path will bend slightly and thus make the sun visible by refraction. Observers can see the sun before it actually comes up over the horizon, or after it sets.