In this case, you can have your friend share a GPS exchange format file (GPX file).
However, often a trail is not anywhere to be found online. Want to load a GPS file on your iPhone or Android device? Want to follow the excellent trail network that your friend just biked or hiked? The easiest way is to use an app where the file has already been added like Hiking Project or Trailforks.