The code we write for your Arduino are known as sketches.
They are written in C++.
Every sketch needs two void type functions, setup() and loop(). A void type function doesn’t return any value.
The setup() method is ran once at the just after the Arduino is powered up and the loop() method is ran continuously afterwards.
The setup() is where you want to do any initialization steps, and in loop() you want to run the code you want to run over and over again.