They typical lightning arrester has a high voltage terminal and a ground terminal. When a lightning surge or switching surge travels along the power line to the arrester, the current form the surge is diverted through the arrestor, the in most cases to earth. High voltage occurs due to lighting create insulation failure in transformers. So lighting arresters are place closed to the transformers.