How is the formula derived?

My teacher gave me this explaination, but I didn't get a chance to ask him questions.

Taking the derivative of y

further integration (not typing out the steps)

Where do you get from? Why do you need to find the length of the curve?