Mobile apps that trace infection chains are called contact tracing apps or exposure notification apps. They assist human contact tracers in their work.
These apps use either Bluetooth or location services, such as GPS. So far Bluetooth has gained more attention, as Google and Apple have placed their combined support behind it.
A device with such an app is constantly broadcasting a unique message while simultaneously looking for those messages. If two devices are in close proximity long enough, those messages are traded and stored on the phone. Throughout the day, the device will trade these messages with the devices it interacts with.
If someone tests positive for COVID-19, their device will transmit the information to devices that it has been in close proximity with. A device will periodically scan for messages in the database.
On the other hand, location services will show where the device has been rather than what it has interacted with. If someone who tested positive shares their location tracking data, the app would notify people who have similar time stamps. If Bluetooth and location tracking are both used, this would provide further context.