These days there is a smartphone app for everything, and for us trekkers there are a number of great training apps for hiking. I've been using one for a number of years now called "Map My Hike GPS Hiking" by MapMyFitness Inc. It is just one of a range of apps all named MapMy.... with variants for running, cycling, dog walking, walking, and general fitness. Free and paid versions exist, for Android and Apple devices.
I find this particular app helpful to help me track my progress by recording my workout time, distance, track by GPS, pace, elevation and other related information. This all helps me track my performance between different workouts to see if I am improving, and provide me with some benchmarks for later hikes. I can also see my routes and others nearby to try.
I'm sure you have your favourite app that you use, let us know below in the comments.