To answer this we must remember that the derivative at a point on a curve, in this case x^2, is simply the value of the gradient of the line that just touches that point on the line. We can start by approximating the value of this gradient by drawing a line between the point at x and a small distance h across which we call x+h. To work out the gradient of this line we've drawn we can use the change in height over the change in width. The difference in the height is given by (x+h)^2-x^2 and the difference in the width is given by h and so the gradient of this approximate line is given as ((x+h)^2-x^2)/h which can expand to give (2x+h). Notice if we making h smaller and smaller, the approximate line that we draw gets closer and closer to the tangent line that defines our derivative. We can go as far as to say h gets infinitesimally small and can be treated as if it is 0 and so we are just left with our 2x as the value of the tangent. This is called taking a limit and the same approach can be used to work out the derivatives of other functions and derive the general rule of x^n=nx^(n-1) with the use of the binomial formula.