If the power window relay on a vehicle needs replacing, begin by disconnecting the negative battery cables, and remove the door panel. This allows you to access the window motor safely and without damaging additional car parts.
To troubleshoot the window motor and relay, check to see the performance of the car's window. The window should still be able to move, though it may stop and become stuck at certain points. Sometimes it may move slowly as well, though if there are no obstructions between the sills of the window and if the window itself is not damaged, the problem may be with the relay.
Once you safely remove the door, disconnect all of the wiring for the locks and windows, and proceed to loosen the bolts around the motor. Remove the motor, and set it aside; the space is now ready for the installation of a new motor. Mark all of the appropriate connections of the old motor, and reconnect all of the wires and bolts to the new motor. Once the motor is reinstalled, you can test to see if the damage was with the motor by simply turning your car back on and testing the window to observe its performance.