It is similar to traceroute command, but it doesn't require root privileges. By default, it is installed in Ubuntu but you may have to download traceroute on Ubuntu. It traces the network path of the specified destination and reports each hop along the path. If you have a slow network then tracepath will show you where your network is weak.
Look at the above snapshot, path to the javatpoint.com is being traced by the tracepath command.