When lightning happens, we often see a bright flash first. After that, we hear a loud sound. The light and the sound come from the same lightning, but they do not travel at the same speed.
Light moves very fast. The flash reaches our eyes almost at once. Sound moves more slowly. The farther the lightning is, the longer the sound takes to arrive.
People sometimes count the seconds between the flash and the thunder. A long wait means the lightning is far away. A short wait means it is close. If you can hear thunder, you should move to a safe place.