Hubs, containing multiple ports, generally connect devices to a network, as segments of a LAN
A switch filters data between LAN segments
A router delivers data along a networks, being connected to at least two networks, in order to perform its mission
Recent models of routers include the featurs of hubs, so you can save some money by purchasing one of them