A switch uses a mac-table where data is routed only to the intended recipient via it's Mac address; it keeps a table correlating the switch port to mac-address. A hub is open to all devices on it. Hubs are prone to being sniffed, while switches are more secure, but can be sniffed with "mac flooding".