To understand flooding, we need to understand the different ways that hosts communicate with each other.
The first way is something that we call Unicast. Unicast is when only the intended destination device receives the unicast frame. so if I have a host that wants to communicate with another device on another port that frame goes into the switch and comes out on a single port going to the host that frame was intended for.
The second type of communication that we normally see on a switch is something called a broadcast. Now a broadcast frame is a frame that is sent into the switch and then the switch sends that frame or broadcasts it out all the other ports except for the port that it came in on. This action is also taken when the switch does not know which port the destination address resides on and in that case the switch will take the packet and broadcast that packet.
Third type of communication that we see on switches is something called a multicast. A multicast is a packet that is sent not to everybody but to a group of devices. This group of devices is usually an intended set of devices that would like to hear that multicast frame.
This is a very efficient form of communication. There are many different protocols out there today that use multicast to more effectively communicate with a group of end devices versus sending an individual unicast packet to each one of those devices and having to maintain that separate conversation.