RE: 3 wires?
correct.... the battery plugs into the ESC and then the ESC plugs into the motor...
there will be 2 wires on the battery side (those are positive and negative and if they are wired backwards something will go poof)
and then 3 wires on the motor side of a brushless ESC.....
(and of course the plug that goes into the throttle channel of your Rx)
if your ESC only has 2 wires on both end than it is a brushed ESC and will not work with brushless motors