Sunrise and sunset are the moments the Sun's upper edge touches a flat horizon, allowing for the bending of light by the air. In calculations that means the Sun's centre is 0.833° below the horizon.
Civil, nautical and astronomical twilight start or end when the Sun's centre is 6°, 12° and 18° below the horizon. After astronomical dusk the sky is fully dark.
Times use the NOAA solar position formulas and are usually within a minute. Hills, buildings, altitude and unusual weather can shift what you actually see by a few minutes.