Well, let's see...
Enter first for loop. Pos is 0, write it to servo, wait 15 ms, increment pos, write it to servo, wait 15 ms, increment pos... and so on until pos is 180. Enter second for loop and decrement pos until 0. Refresh the servo.
In order for this code to work as espected, you MUST refresh the servo EVERY TIME you write a new position to it, then wait 15 ms. Why? because the library is made as "set and forget". That means if you don't write a new position and refresh, the servo will hold the curent position.