For Dimarzio, solder the red wire to where you took out the original wire in the switch. Solder Black & white wires together & cover it with a tape. Solder the green & bare wire to the ground (on my strat i did it on the volume pot). Seymour Duncan
is the same way but the wire color codes are different. Black goes to switch, white & red solder & tape together, green & bare go to ground.
You can find the diagrams & instructions at the manufacturer's website.