Hubs and repeaters are fairly simple, 'non-intelligent' devices:
whatever comes in on one port, gets amplified and send out to ALL other ports, so any network transmission 'fills up/flows into' ALL cable-segments of the network, so only ONE network connection can be active at a time on the complete network !
Gateway: device sitting at a network node for interfacing with another network that uses different protocols. Works on OSI layers 4 to 7.
Router: a ...
Hubs and repeaters are embedded.