On the Internet, a router is a device or, in some cases, software in a computer, that determines the next network point to which a packet should be forwarded toward its final destination. The router is connected to at least two networks and decides which way to send each information packet based on its current understanding of the state of the networks it is connected to. A router is located at any juncture of networks or gateway, including each Internet point-of-presence. A router is often included as part of a network switch.
A router creates or maintains a table of the available routes and their conditions and uses this information along with distance and cost algorithms to determine the best route for a given packet. Typically, a packet may travel through a number of network points with routers before arriving at its destination.
In general, a hub is the solid central part of a wheel where the spokes come together (think of a bicycle or wagon wheel). The term is familiar to frequent fliers who travel through airport "hubs" to make connecting flights from one point to another. In data communications, the word "hub" means a convergence place where data comes in from one or more directions and is forwarded out in one or more other directions. A hub usually includes a switch of some kind. (And a product that is called a "switch" could usually be considered a hub as well.) The distinction seems to be that the hub is the place where data comes together and the switch is what determines how and where data is forwarded from the place where data comes together. Regarded in its switching aspects, a hub can also include a router.
1) In describing networks, a hub topology consists of a backplane (main circuit) from which a number of outgoing lines can be attached ("dropped"), each providing one or more connection ports for devices to attach to. For Internet users not connected to a local area network, this is the general topology used by your access provider. Other common network topologies are the bus network and the ring network. (Either of these could possibly feed into a hub network, using a bridge.)
2) As a network product, a hub may include a group of modem cards for dial-in users, a gateway card for connections to a local area network (for example, an Ethernet or a Token Ring), and a connection to a T-1 line (the main line in this example).