In Indian Railways, locomotives draw electricity from the overhead contact wire (OHE) through a pantograph. The pantograph is a metal structure that can be raised or lowered to make contact with the OHE.
It transfers power to the locomotive’s motors (usually via a transformer). The OHE system ensures continuous supply to the locomotive during its journey