A hub is a pass-through device that transmits all frames to all devices it is connected to except the device sending the frame. A switch is smarter and transmits frames only to the device to which the frame is addressed, or, if the MAC address table doesn't have a particular entry, the switch operates like a hub and sends the frame out to all devices except to the one sending the frame.