The concept is straightforward. To produce sound, you'll need a sound generator - something that produces the sound. That sound can be generated from various sources. They can come from your keyboard itself - all your synths, digital pianos, workstations etc. They can also come from "racks" you mentioned (or what we usually call sound modules). They can also come from your notebook/PC - and this comes in various forms as discussed above (from plugin instruments etc, or even the lousy sound that comes from your build-in soundcard). For the keyboard, all routing is internal. You press a key, the sound comes out. The only connection you need is to the speakers (if they are not built in). For external sound generators (ie modules, PC/notebook, or even other keyboards), like what alshit said, you connect midi cables from your main keyboard (which will now be called a "master controller" - function what the name implies) to your sound generators. All external sound generators come with midi ports which you connect directly. All with the exception of the PC/notebook - which you'll need to get a midi interface. This usually comes as a USB midi interface or built into the external audio interface itself. Your master controller, via midi, will be able to "talk" to these external generators - press a key, and a sound is produced from these generators.
Which brings us to the next point - for PC/notebook, you'll definitely need an external audio interface. You should not use the build-in soundcard (which should be disabled). External audio interfaces come in various forms - USB, firewire and PCMCIA. PCs have the benefit of using PCI audio interfaces - my preference if using a PC.