You search for, then you try understanding, then write some simple sketches to see if you can get things to work.
https://www.arduino.cc/en/Tutorial/BuiltInExamples/BlinkWithoutDelay