What is Traceroute?
Traceroute reveals every router hop between a source and a destination, along with the latency at each one. Where ping only tells you whether a host is reachable, traceroute tells you the path the traffic takes to get there — which is exactly what you need when something is reachable but slow, or not reachable at all.
It works by sending packets with a gradually increasing Time To Live (TTL), forcing each router along the path to reply once before the packet would otherwise expire, effectively mapping the route one hop at a time.