Technically, we can't. Sunrise is defined as the moment that the Sun first appears over the horizon. So, by definition, you can't see the Sun before it appears. But you're right that we can see the Sun even when it is *geometrically* just below the horizon, at both sunrise and sunset. This is because of the refraction of the light from the Sun by the Earth's atmosphere--the Earth's atmosphere bends the path of the light so that we see the Sun in a position slightly different from where it really is. The magnitude of this effect varies with latitude, but it's strongest at the equator, where the Sun rises 2 minutes earlier than it would if the Earth had no atmosphere, and sets 2 minutes after it would if the Earth had no atmosphere. This effect is discussed further here.
This page was last updated on Jan 28, 2019.