Amps (heads or combos) put out power. They are rated for how much power they can put out, either continuous power (sometimes referred to as average or rms power) or peak power. An amp rated at 100 watts means it will put out an average of 100 watts to the speaker/s. They commonly rate amps at 1/2 of their output capacity. So a 100 watt amp can probably put out 200 watts of "instantaneous peak" power (aka "transient peaks"), but it will "average" 100 watts of "continuous power".
Speakers are rated for how much power they can dissipate in the form of heat. That's why they say voice coils get hot. Speakers are usually rated the same way as amps. A speaker rated at 100 watts means it can absorb or handle a continuous average input of 100 watts of power without any problems, and it can probably handle 200 watts of instantaneous or transient peak power. (Instantaneous meaning split seconds, or milliseconds)
A speaker cab rated at 400watts might have two 200 watt speakers, or it might have four 100 watt speakers. Another term you might want to get acquainted with is "speaker breakup." This is the distorted speaker sound you hear, for example, in some classic rock songs where the guitar is starting to sound heavy or distorted. A good example might be Billy Gibbons guitar on several early ZZ Top songs. Speaker breakup is ok, it usually wont hurt the speaker as long as the speaker rating is higher than the amp rating. That's why you will frequently see a 25 watt speaker in a 15 watt amp, or a 75 watt speaker in a 50 watt amp, etc..... Some guitar players like speaker breakup, and some speakers have breakup that is more musical than other speakers.
On the other hand, you might see a 50 watt amp running into a 200 or 400 watt cabinet. Some players do not like speaker breakup (I am one who does not want it) and they avoid it by using speakers that are rated significantly higher than the peak rating of the amp. That way it is possible to hear the pure sound of the amp, even if the amp is played so loud that the tubes in the amp are driven into distortion. Tube distortion is, in my opinion, much smoother and more musically usable than speaker distortion.
For example, in order to avoid speaker breakup I will run a 15 watt amp into a 150 watt cab, or a 25 watt amp into a 200 watt cab. By using a low wattage amp I can turn the amp up loud enough to get tube distortion without breaking my ear drums, but at the same time I do not get speaker breakup because my speaker cabs are rated so much higher than the peak output of the amp.
The amp is the only thing that determines how loud your guitar is (assuming you have correctly matched the speaker out ohms to the speaker cab ohms). A 15 watt amp will sound just as loud thru a 25 watt speaker as it will sound thru a 100 watt speaker. The only difference is the 25 watt spekaer will distort more easily than the 100 watt speaker will. On the other hand, one thing that will make your amp sound louder is using more speakers. A 15 watt amp plugged in to a 4x12 cab will sound quite a bit bigger than the same amp plugged into a single 1x12 cab.
The most important things are (1) match the ohm rating of the amp output to the ohm rating of the speaker or speaker cab, and (2) never use a speaker or a speaker cab that is rated lower than the amp output.
Hope this helps......