The mechanism works via a worm gear that is attached to the motor shaft, that powers a gear wheel that pulls the cable through the regulator.
If you can reach, unbolt the bracket that hold the bottom of the window to the regulator slide. Once free, the window should fall down.
unbolt the motor and the bolt holding the top of the regulator slide and pull the bottom of the regulator slide towards the door hinge so you can pull it out of the opening at the bottom of the door.
Undo the screws on the plate of the motor mechanism. Then using a flat blade screwdriver, carefully lift off the pully with the cable wrapped around it.
You can them remove the large gear wheel, which in turn allows access to the worm gear.
Now, I've only got this far becuase my cable has snapped and my motor is fine, So I cant advise what the next stage is.
So, you either pull the worm gear off its shaft and pull the motor and shaft out, or it may be that the motor body separates in two from its top bit where the shaft enters the mechanism. I.e the new motor is just a body, and the shaft and worm gear are part of the mechanism.
Easy way would be to find out what comes with a new motor.