Rule 1: don't use a cab (or cabs) with a 'smaller' impedance number than the one on the back of the amp i.e. don't use a 4ohm cab with an 8ohm head, unless you like shopping for new amps and have money to burn - that's literally what you'll be doing.
After that it gets a tiny bit more complicated, but not by much.
Rule 2: Using 2 x cabs of the same impedance will halve the 'impedance number' e.g. 2 8ohm cabs will give you a total impedance of 4ohms. Using 2 4ohm cabs will give you a total impedance of 2 ohms. Thankfully, nobody really makes bass cabs that aren't 4 or 8 ohms, so there's a whole bunch of stuff we don't need to bother about.
Rule 3: Don't mix impedances. Using a 4ohm cab [b]and[/b] an 8ohm cab will give you a total impedance of (memory fails at this point, but it's less than 4, probably 2.7 or something) not enough for an 8 or 4 ohm amp, so [b]don't do it[/b].