You will need to install catanary splines above your track. These include the poles or stanchions as well as the overhead wires. It can be a very tricky job to get it looking right. They are found in the Objects Spline tools tab although the names used for the assets may not be obvious and many may be in European languages.
Trainz will still operate electric locos without the overhead wiring installed.