Lightning is an electrostatic discharge that occurs naturally when two electrically charged regions, either in the atmosphere or on the ground, collide.
Taller structures are closer to the clouds. Thus, these structures are more prone to thunder and lightning.
As a result, lightning conductors are installed in such structures to protect the building from lightning. The charge is carried to the ground via the lightning conductor, so it will not accumulate on the building. This keeps the building safe from lightning strikes.
Metal rods or metallic devices placed at the top of an elevated building serve as lightning conductors.