Fade an LED on

I think what's happening is the section of code is running once setting the pin to 10 and then continuing. How can I make it repeat over and over until the led is fully brightened and then continue onto the rest of the code?