To serially connect the two coils of a 4-wire humbucker in the standard manner (creating the humbucker sound), you must first connect and solder the end of the first coil (B) to the beginning of the second (C). In the installation instructions for your pickup there will be a guide showing which function each of the four cables serves (see color codes)! If you cannot understand the codes, then only measuring will help. Additionally do not forget to insulate the solder joint (insulating tape or heat shrink tubing), if the junctions come in contact with other conductive elements there may be some unwanted complications. Next, connect the hot wire (A, often red, but sometimes black or green) to the point where the hot wire of the previous pickup was soldered. Now take cable D and the uninsulated ground cable and solder both to a grounded location, most often the case of a regulator. Make sure that the ground cable won't come in contact with any other conductive elements.
If, after installing your new humbucker in an instrument with a 2 humbucker set-up, you find that they sound 'out-of-phase' (thin and quiet), you'll need to rotate the phase of one of the humbuckers. It doesn't matter which of the two pickups you choose as it makes no difference for the sound! And don't worry, this happens to everyone and very easy to fix: all you have to do is swap cables A and B of the chosen humbucker!
Two pickups connected in phase via a switch sound normal - fat and tight. Out of phase humbuckers, on the other hand, sound thin and nasal. That's because in this "mode", a lot of basses and mids are lost.
To explain the effect better we'll use an example from the world of loudspeakers: if a sound is transmitted simultaneously via two loudspeakers that are in "phase", the sound delivered is bold and loud because both speakers are vibrating in tandem. If the phase on one is reversed things are a bit different! The membrane of one speaker moves forward while the other moves back. The result: the sound is thin and quiet.
There is another variant for wiring a humbucker: parallel. In this mode, both humbucker coils work like stand-alone single coils. The pickup provides a little less power (about 30% less) but produces better highs - making the sound subjectively clearer and more transparent. Despite the parallel connection of the two coils, the hum compensation effect is maintained. This effect is achieved by connecting the two coils of a humbucker in the following manner: You need to solder the cables A and C together. They become the hot link. Then solder B to D, these two are then connected to the ground together with a bare ground lead (usually to the back of a potentiometer). If it becomes necessary to rotate the phase of the pickup in this configuration, you will need to swap the two pairs. A and C are grounded, B and D take over the "hot" job.