The setup() function, which is called once when a program (sketch) starts. It is used to initialize variables, pin modes and libraries. The loop() function, which runs continuously after the code starts. This is where you program events to happen such as the blink of a light, the activation of a servomotor or the reading of a sensor value.