Undo the screws, clips, or retainer springs that hold the headlight in place. Disconnect the wiring from the assembly. Detach the headlight from the vehicle to replace it with a new one. Fit in the new headlight assembly.
Fix the new headlight into place and make sure that the screws, clips, or retainer springs are sealed. Reconnect the wiring that was unplugged from the assembly. Put back the grille and other components that you removed.
Seal them back into place.