controlling micro servo

I want to learn how it operates and by using the library it kind of conceals the whole operation.

How is the code from the library different to my code? Doesn't it execute the code from the top to the bottom?