The sun is visible to us 2 minutes before the actual sunrise because of atmospheric refraction. When the sun is below the horizon, the light travelling from rarer to denser medium bends and reaches our eyes creating an impression that it is above the horizon.