IP routers drop packets when there is congestion but a hub doesn't know about collision.
Ethernet switches learn the location of hosts on their network by observing the frames they process. The switch learns which devices, called stations in the standard, are on which segments of the network by looking at the source addresses in all of the frames it receives. As each frame is received on each port, the switching software looks at the source address of the frame and adds that source address to a table of addresses that the switch maintains. This is how the switch automatically discovers which stations are reachable on which ports.
If an IP router doesn’t know the location of a destination IP address in a packet it receives, it will send it to default address in routing table.