The Secrets File forms a major part of keeping OTA and API Keys secret as well as Wifi Credentials

The file is located in the main root folder of the ESP's and is called secrets.yaml

Its used inside the esphome yaml file like this

wifi:
  ssid: !secret wifi_name
  password: !secret wifi_password

Then the file looks like this

wifi_name: "<SSID>"
wifi_password: "<WPA2 KEY>"