I get asked this question A LOT, so here's a relatively easy explanation of how to plug your amp into your speaker cab.
Electronic amplifiers pump electric currents into loudspeakers in a way similar to a water pump pushing water through a hose. The pump expends energy to creates pressure, and the water moves under the force of that pressure. In an amplifier, the pressure corresponds to voltage, and the water flow corresponds to current.
But you know that if you step on the hose that the water flow lessens. If you crank up the pump (or open the faucet) the water flow increases. Want even more water flow? You might need a bigger hose. There is a concept of flow capacity when we consider the hose, and that is related to impedance.
It's easy to see that a smaller hose restricts, or impedes, the water flow. In the same way, a cable, amplifier or speaker has an impedance, though it is not quite so cleanly analogous to the diameter of the hose. Here's where we depart into the void.
Impedance relates the ability of an electronic component or system to carry current. The lower the impedance, the less the current is impeded, and the more current can flow.
Impedance is very important when one is trying to move as much power as possible from an amplifier to a speaker. This is actually true of any mechanical or electrical source and load.
It turns out that the maximum power is transferred from source to load when the two impedances are equal. For example, an amplifier with an 8 ohm output impedance will put the most power into an 8 ohm speaker.
That's why it is important to load your amplifier with the proper impedance. Too low a speaker impedance will cause the amplifier's output current to increase, and the voltage to drop, resulting in less power output to the speaker, and more heat dissipated in the amplifier.
Too high a speaker impedance will lower the output current, also reducing power output.
Your amps output jacks should be labeled with their output impedance (or Ohms) and your speaker cab should also be labeled. Some amps are hard wired i.e. old Fenders while some have switches or plugs for changing the jacks to different output Ohms. If they are not you can measure your cab with a multimeter set to resistance. This will not measure exactly i.e. 4 Ohms but more likely 3.6 or 4.2 etc. The amp is a little more complex. You need to disconnect your output transformer to measure the loads on these, or look up a reputable site with details of your amp. DO NOT just assume and plug anything into anything.
Remember to ALWAYS use a proper SPEAKER CABLE for connecting the amp to cab. DO NOT use a guitar cable as I've seen many people do. A speaker cable is 2 core of exactly the same size and impedance. A guitar cable is a shielded single core so one wire is higher impedance than the other. Using a guitar cable can seriously damage your amps output transformer.