A hub is a simple networking device that connects multiple devices in a network, broadcasting incoming data to all associated components.
A switch is an intelligent device that receives incoming data and selectively forwards it to the appropriate device based on the destination MAC address.
A router is a networking device responsible for interconnecting multiple networks and forwarding data packets between them using IP addresses as the basis for routing.