Hub
A hub can be used to connect segments of a LAN. Hubs have multiple ports. When a packet arrives at a hub, it is copied to the other ports so all segments of the LAN can see all packets. Incoming frames are forwarded to every port so that each node on the network receives the every packet.
Switch
A switch filters and forwards frame between LAN segments. A switch records the MAC addresses of connected devices and can then forward incoming frames to specific ports (and thus specific nodes on the network).
Router
Routers forward data packets along networks. Routers are connected to two (or more) networks at gateways (places where two or more networks connect). Routers determine the best path for forwarding packets by using headers and routing tables.
Frames and Packets
Frames occur at the network access layer of the TCP/IP model or the physical and data link layer of the OSI model.
Packets occur at the Internet layer of the TCP/IP model or the network layer of the OSI model.