The app does not access or track your location. The app only records your distance from other phones that have the NHS COVID-19 app installed. This data is held on your phone.
If you choose to use the venue check in function, your phone will hold protected data about which venues you checked into, and at what time.
The NHS and the government will not have access to any of this data. They cannot use the app to track your location, for law enforcement, or to monitor self-isolation and social distancing.