To start editing, open the trail, then on the map click "Edit" at the top right.
Editing allows you to:
To add a waypoint, select a point on the trail, then choose the "Waypoint" menu and "Create waypoint".
To edit or delete a waypoint, select the waypoint on the map, or more easily click the waypoint in the waypoint list. Then use the "Waypoint" menu to edit, move or delete the selected waypoint.
Various options let you modify or improve elevations.
You can complete the trail by selecting the start or end point, then using the "Path" menu which offers options to finish the trail.
Many options are available for editing the track; feel free to explore the menus, select a point or an area and check the menus again for options related to the selection.