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: