Let's explore the secant line to the curve y=x2 at the point around x=1.

Using the definition for average rate of change as the change in function value

f(x2) - f(x1) divided by the change in input value x2 – x1 

at x1 = 1, f(x1) = 1 and at x2 = 2, f(x2) =4. Therefore, the average rate of change is going to be:

(4-1)/(2-1)=3

We can continue this process of calculating the slope of the secant line for values of x2 going closer and closer to x1.
You can see what happens with the value of the slope of the secant line by clicking on DEMO:

Notice that as x2 approaches x1, the value seems to go to 2.001 (or 1.999 depending from which direction you approach 1. When x2 = x1 the value becomes suddenly  “NaN”. What is happening?