The rotor should be inspected and/or replaced when the distributor cap is replaced.
Rotor replacement instructions vary, so always follow the manufacturer's instructions.
General removal procedures for most rotors is to snap the old rotor off and snap on the new rotor.
For screw attachment rotors, use a screwdriver to remove the screws then lift off the rotor. Set the new rotor in place. Then securely the screws using a screwdriver. Don't over tighten or leave slack in the screws.
Some manufacturers recommend smearing some silicone dielectric compound on the tip of the rotor. This cuts down on arcing and radio interference, extending the life of the rotor and cap.