The alerts use software built by Apple and Google into iPhones and Android devices to detect when people (or the phones they’re holding) get into close contact with each other. That might sound like a privacy invasion, but they figured out how to track encounters between people in a way that’s anonymous — and doesn’t store your location — by using the Bluetooth wireless technology in phones.
Source: FAQ: How to get coronavirus exposure notifications on your phone - The Washington Post