Sound travels through air at "the speed of sound." Officially, the speed of sound is 331.3 meters per second (1,087 feet per second) in dry air at 0 degrees Celsius (32 degrees Fahrenheit). At a temperature like 28 degrees C (82 degrees F), the speed is 346 meters per second.
As you can see, the speed of sound changes depending on the temperature and the humidity; but if you want a round number, then something like 350 meters per second and 1,200 feet per second are reasonable numbers to use. So sound travels 1 kilometer in roughly 3 seconds and 1 mile in roughly 5 seconds.
When you see the flash of a lightning bolt, you can start counting seconds and then divide to see how far away the lightning struck. If it takes 10 seconds for the thunder to roll in, the lightning struck about 2 miles or 3 kilometers away.
These links will help you learn more: