When guest mode is turned on, Chromecast emits a special Wi-Fi and Bluetooth beacon. When a Chromecast-enabled app is launched on your guest's mobile device, that device detects the presence of the special Wi-Fi or Bluetooth beacon and shows the Cast icon in the application. Upon tapping the Cast icon, casting to a "Nearby Device" will be listed as an available option.
Your Chromecast then generates a random 4-digit PIN that is required to cast to it using guest mode. When a device nearby tries to connect, the Chromecast automatically transfers that PIN using short, inaudible audio tones. If the audio tone pairing fails, your guest will be given the option to connect manually by entering the 4-digit PIN found on your Chromecast Ambient mode screen and in the Google Home app.
Learn more about the guest mode PIN.