You should go through the setup guides associated with your selected set of hardware, and make sure you have internet connectivity with the device before continuing. The following links will take you to the guides for your selected platform.
You will need to make sure you have at least version 2.3.1 of the Adafruit IO Arduino library installed before continuing. You will also need the Arduino HTTP library and Adafruit MQTT library so check the setup guide above to get all set up!
For this example, you will need to open the adafruitio_06_digital_in example in the Adafruit IO Arduino library.
Next, we will look at the network configuration options in the sketch.