How exactly does traceroute/tracert work at the protocol level?
Traceroue uses TTL values in order to find the path to target. Each time it increases the TTL value to find the path to target.
Windows uses ICMP by default while Linux uses UDP.
TTL:
Time to live (TTL) refers to the amount of time or “hops” that a packet is set to exist inside a network before being discarded by a router.