On an iPhone you have a Free App to download called Find iPhone.
Generally this is used for locating a lost or stolen iPhone, using another iPhone or Computer and with the ability to remotely play a sound to help locate the device or Delete all the Data on that iPhone remotely.
If you have 2 iPhones or more in a family and they share the same Apple ID Account that you use to purchase Apps (through iTunes) and to Manage & Backup your data & Apps. If both iPhones use the same Apple ID & Password then the "Find iPhone" App can be used to check and see the GPS position of the other iPhone on a map.
The tracking is not saveable as a file. Also www.icloud.com
can be used to log in and see the location of all devices in the family (on the same Apple Account).
There is also an App called Find Friends that allows you to track friends current location but it does require & request their permission when first used.
You could also get a free App and install it on the other persons iPhone and simply have it running in the background to remember all GPS location data during a period of time. e.g. a "Pedometer" to track a persons movements. You would require access to the iPhone at some point to recover that data by plugging in to a computer using iTunes to recover the location data. Running some GPS Apps in the background will noticeably reduce the battery as all GPS tracking devices do.
Figure out the details by installing the Pedometer or iTrack App on your own phone first.