Lightning can travel up to 10 miles (16 km) from its source, and it can strike from a cloud that appears to be far away. In addition, lightning can strike the ground without ever touching the clouds. This is called a cloud-to-ground strike.
If you see lightning or hear thunder, you should go indoors immediately. Stay indoors for at least 30 minutes after the last clap of thunder. If you are caught outdoors, seek shelter in a sturdy building, a metal vehicle, or a low point in the terrain. Avoid tall objects, such as trees and power lines.
Lightning is a dangerous weather phenomenon, but it can be avoided if you take precautions. If you are in doubt about whether or not you are safe from lightning, err on the side of caution and go indoors.