The amp is capable of running at those 2 impedences when it "sees" it. In other words if the speaker is pushes has a 2 ohm impedence than the amp will run hotter and push more wattage, if the speaker is 4 ohm then it will run 40 watts to it to each 4 ohm speaker.
Let's say you tried to run this amp at 1 ohm impedence and it was not rated at that low stable.. you can kiss the amp good bye.
speakers voice coils determine ohm impedence and amps adjust to that impedence.
hope that helps