switch is at link layer or looks at links (i.e. switching between links)
router is at networking layer or looks at network routes to find the optimal path
switch is generally "harder" (more likely to be implemented in hardware or firmware) than router
a lot of times people don't distinguish the two