In very general terms, a switch acts like a splitter and just passes along what comes down the line whereas a router manages connections and assigns addresses to any attached computers.
You would use a switch when you want to extend a network, say when you have one LAN connection in a room, you can use a switch to allow other computers in that room to connect to the network. If you used a router, you would essentially create a separate network and while it would work for the internet, those computers would be isolated from the rest of the network.
Again, this is in general terms and you can configure routers to act as switches. Switches are usually much cheaper than routers though so unless you just have a spare router laying around, a switch would be less expensive.
Is there something in particular you are trying to accomplish?