How does the Tesla Coil work and how can I optimize its use against enemies?
Tesla Coils work like a continuous application of Shock Jockey. They will stunlock enemies that get too close to them. They never run out of juice. You can pretty much take your time dispatching any enemy that is stuck on one.
The Undertow Vigor is pretty good when you've got one of these around - you can pull enemies towards it, and then dispatch them at your leisure.
They're not effective against Handymen, sadly. I have stunlocked Firemen with them, though.
They're also pretty good as cover, since they're large and will stop bullets and explosives that impact the opposite side from harming you.
As agent86 said, they continuously run and never run out of energy.
However, I've found that triggering them right before the enemy gets close enough helps surprise it. Whenever I triggered it too early, they'd go around it in some way -- sometimes even running to the staircase to their right and taking an alternative route. (That could be because I played on Hard, though)
Just to touch up on the other answers. These tesla coils aren't positioned by any automated npc's. Normally the appear in battles or miniature battles within the campaing.
These are an effective way to get an upper hand in combat. When the tesla coil is activated, the distribute a burst of electricity that is the equivalent to Shock Jockey.
They have a "reload" period where they don't re shock the target, so be aware of that. Not sure of the exact time (but around 10 seconds).
Playing right now on 1999 mode, these can seriously gain an advantage on hostile npc's. (In my case vox populi).