The question's pretty ambiguous.
where in a physical topology like a WAN or LAN are things like routers/hubs/switches used?
A hub/bridge/switch is used to connect any networkable device such as PCs or printers together. This forms the LAN
A router is the outermost device of the LAN - the LAN will end once it reaches the router. This will be where access to other parts of the corporate network over a WAN or access to the internet takes place.
A gateway is simply the router that a PC uses to exit the network. See your default gateway configurations for your router's IP
1 could either be a hub, bridge or switch, because it is connecting the pc's on the LAN together.
2 could be anything ... could be a router and hence a gateway ... my guess would be that it's a repeater because there is only one cable in and out - these just send the data again so the signal doesn't degrade
3 has got to be a router, because it's connecting several networks. Thats the main function of a router - to route packets between networks like what phoenix said
4 I have no idea.. it looks to be like a token ring network which don't really exist today (but are in the old IPT textbook my school gave me). If so, wikipedia says that the device is a MAU. <shrug>. If it were a hub then the two white box devices shouldn't be connecting.
All in all though the picture's -really- bad to try and learn from i wouldn't suggest using it