Led keeps on after statement is reached

pert:
If you set a pin HIGH it's going to stay HIGH until you set it LOW. The Arduino won't magically know it's supposed to go LOW if you don't tell it to. It seems like you're trying to run before you learn to crawl. I recommend you to study File > Examples > 01.Basics > Blink and the associated tutorial:
https://www.arduino.cc/en/Tutorial/Blink

So beacause i asumed that an if statement will only be executed when the statement is reached, which in my oppinion is not so weird to asume if you just started i cant progress further and need to learn the basics again? I just asumed something wrong if maybe you could just help me with an solution or an tip on how to look at it i could work it out. So do you maybe have an solution on how to solve this or an example so i can see for myself what i did wrong. The sentence ''it seems like you're trying to run before you learn to crawl'' is irrelevant and not nessasary you could've just said you did something wrong here and there you should look there, search the web for ... or that kind of things which would be more usefull for me and other that read this topic.