routers do not necessarily provide IP addresses on a network, in fact in most networks they do not. you use a server running as a DHCP host for assigning addresses.
Routers sort and send network traffic based on rules (router tables). routers have 2 "sides" and based on the rules either send traffic through or block it / send it back. they have 2 different network addresses, and "internal" and "external"
Imagine this scenario:
PC A address 111 on network 222
PC B address 555 on network 333
PC C address 333 on network 222
PC D address 888 on network 222
PC's A, C, and D are on 1 side of the router, B on the other.
PC C broadcasts a message to PC A that message would be dropped by the router as to not get to PC B. B would never even know the message existed.
PC A sends a message to PC B, the router knows B is on network 333 so if forwards the message on to PC B
that is the most simple explanation I can give for the general gist of it.
a switch would have PC A, C, and D connected to it, and when PC A sends to PC D the switch would not send that message to the port PC C is on because it doesn't need to go there. notice they are all on the same network though.
A hub would send A's message to port D and C. no "intelligence"
now consumer "routers" from best buy for $40 are a meld of both switch and router and hub. the 4 ports on the back generally work as a hub since 4 ports are not enough to cause network traffic problems, broadcast messages are fine. the jack you connect the "internet" to on those is "the other side" of the router part. in the router config you can see the IP your ISP gives you (the EXTERNAL address), and the address you access the router (like 192.168.0.1) is the INTERNAL address.
most here don't need ot bother knowing more than that so I won't go on, but I hope that clears a bit of the air.