I'll try to explain it, using your spider analogy, as best as my own understanding of it is (which may be all wrong!
)
First of all, bear in mind that this is done very gradually, over a period of weeks, months, however long it takes. It's
not going to happen in one or two sessions.
Let's imagine that you are the dog, and I as the trainer take you to a place where you can see the scary spider, but it is at enough distance away that you are not reacting with more than alertness yet, you are aware that it is there but not quite ready to run screaming yet. (Preferably there is a fence or some sort of safe feeling barrier between you and the spider)
(Possible drawback: requires a lot of space as every dogs "panic area" is different; also requires the trainer and/or owner to have excellent skills at "reading" dogs, signals of discomfort may be as subtle as a tightening of the mouth or a "hardened" expression in the eyes)
I (trainer) toss you (the dog) a high value reward, (maybe chocolate) since you maintained your composure, and we retreat.
In the next session, we decrease the distance to the spider based on your body language. (Again, exquisite skills in reading dogs required, as we will be moving toward that line between bearable, mild stress and total panic or aggression) We progress to a point where the spider tosses you chocolate
(or the handler of the stooge dog, or the "scary stranger" tosses the reward)
Over time, we move closer and closer to the spider until it is just on the opposite side of the fence from you. The spider has showered you with enough chocolate that you remain interested (your fear may still be there but hopefully lessened), so now we progress to intermittant rewards to maintain your interest. Eventually we hope to remove the fence between you and the spider.
The ideal goal would be to have the spider pet you and have you enjoy it. However, depending on you we are willing to settle for having a civilized encounter with the spider ( especially in the case of aggression we are looking for a civilized encounter)
On the other hand, the term "flooding" would be correct in putting you in a room full of spiders in the hope that you would become "used to" them, and conquer your fear. What usually happens in flooding however, is that the dog shuts down and can suffer from something like psychosis from it