Does a traceroute change when you switch DNS servers?
Generally, no, although there are cases where it could, especially for large/global sites - for example if you switch from using a DNS server at your ISP in LA to using a DNS server in, say, Paris then it's likely you'd get routed to a server in Europe because the site has configured their network to route European users to a Europe-based server and US users to a US-based server, and the way that's typically done is by populating the DNS table with different values depending on where the request comes from.
It doesn't even have to be such a broad geographic distance. For example if I lookup www.google.com from here in San Jose, CA I get 74.125.45.99. If I perform the same lookup from a server in Houston, TX I get 64.233.169.99. Clearly google are optimizing their network so that someone that appears to be in Texas (because they're using a DNS server in Texas) gets routed to a nearby datacenter, whereas a user in CA gets routed to a CA-based datacenter.
FWIW I get a difference of about 30ms on a ping to the two different servers.
I also am confused over the difference between changing the DNS servers on my router vs. in my OS. What happens if I change one and not the other?
Absolutely nothing. The server setting in the router is only used by lookups performed by the router itself (e.g. if you were using it's admin interface to perform a trace or lookup). If your machine is using some other DNS server (e.g. one provided by your ISP) then it doesn't matter what the router is using.
The only exception to this is if your router is running as a DHCP server and it's telling clients to use whatever DNS server it is configured with, then the router would push that server address to the clients.