In networking whenever a switch receiving any message on any port, first of all it will check the the source mac address to update the mac address table and then next it will check the destination mac address from the Ethernet header to take the forwarding decision.
Whenever the switch find the destination MAC address in the Ethernet header as broadcast market dress or FF-FF-FF-FF-FF-FF then it detect the message is a broadcast message and take the decision according to that.