Routers route data between different networks or subnets. they are layer 3 devices so they route based on ip addresses.
Bridges operate at lvl 2. They are only concerned with mac addresses. so therefore they operate in the same network or subnet. not between networks. they learn the mac addresses associated with the specific port connected to that mac. pc A wants to talk to pc B if the bridge knows where pc B is then it forwards the frame. If not then it floods the information out all ports except the one it recieved it on.
Switches do the same thing as bridges but use fast integrated circuits to reduce latency. Switches are the evolution of bridges.
Hubs are dumb. meaning there is no process to decide where the packet is to be sent to. they operate at the physical layer. when data arrives on a port of a hub it is flooded out all other ports.
this is very basic but I hope it helps. 🙂