I can give you an example with a simplified system:
Laptop
Traktor Kontrol (S2 or S4 makes no real difference for our purposes)
Powered speakers & sub (in my case, JBL EON 515XL tops and 518 sub)
The laptop is connected via USB to the Traktor Kontrol controller, which is also a USB “sound card.” The Traktor Kontrol does not have XLR outputs, but it has balanced (i.e., 3-conductor) 1/4" output jacks which are electrically identical. You either need cables that have 1/4" jacks on one end and XLR male on the other, or a standard mic cable and some 1/4"-to-male XLR adapters. Using whichever you have, you plug the 1/4" plugs into the controller (both left and right channels), and plug the male XLRs into the single subwoofer. This particular sub is designed with two inputs and outputs and an internal crossover. To get sound to the tops, you plug in a pair of “mic cables” (i.e., XLR cables) from the two outputs on the sub to each of the tops.
By default, this gives you a mono subwoofer and stereo tops, which is just fine. The crossover inside the sub splits the signal and sends the frequencies below 100 Hz to the sub, and anything above that to the sub’s outputs, which are connected to the tops. That way, the tops aren’t trying to reproduce the sub-bass, which they aren’t able to do anyway.
If you had 2 subwoofers, then you’d run a cable from the controller’s Left or #1 output to the sub, and another from the sub to the top, and duplicate that on the Right or #2 side.
Many powered speakers & subs have crossovers like this built in, but most passive speakers do not, so a separate crossover (and external amps) would be needed, along with different wiring.
Oh, and power is the LAST thing you connect and the FIRST thing you disconnect. You should also power up all of your signal components FIRST and your amps LAST, and turn the off in reverse order: amps off first, and signal stuff last. Obviously, make sure the master on your mixer or controller is turned down before you power on your amp(s), so you don’t accidentally blow your speakers.