An ESP motor is a two-pole, three-phase induction motor built as a long, slim unit so it fits inside the casing below the pump.
Cooling
The motor is cooled by the produced fluid moving along its housing, which is why a minimum flow velocity past the motor is part of every design check.
Protection
A protector separates the motor oil from well fluid and absorbs thrust, so motor and protector are always selected together with the pump.