How do beacons work?