Before I ask, I want to tell you that I am beginner in limits, so you may find some problems in my understanding.
Let's assume a function $f(x) = 15-2x^2$. We want to know how the function behaves at $x=1$. Specifically, we want to know the slope of tangent line at $x=1$.
Simply, we get a good formula for that by doing this: $$m=\frac{f(1)-f(x)}{x-1}.$$ Then we get the equation $$m=\frac{2-2x^2}{x-1}.$$
Now we have to take the limit to find the slope of the tangent line, $$\lim_{x\to 1} \frac {2-2x^2}{x-1}.$$
To solve this we simplify it like this : \begin{align} \lim_{x\to 1} \frac {2-2x^2}{x-1} =& \lim_{x\to 1}\frac {-2(x-1)(x+1)}{(x-1)} \\ =& \lim_{x\to 1}-2(x+1) \\ =& -2(1)-2 \\ =& -4 \end{align}
In algebra class when we had a fraction and we wanted to cancel something we always say $x \ne a$. For instance $\frac {1}{x-1}$. Here $x \ne 1$, because $x-1$ would be zero.
But here in limits I found something unbelievable: here we are dividing by zero and that's forbidden.
$$\lim_{x\to 1}\frac {-2(1-1)(1+1)}{(1-1)}.$$
We are just canceling zero in this fraction. Can anyone explain this?
You are actually canceling the factor $x-1$ from numerator and denominator. This works as long as $x \ne 1$. Keep in mind that in the limit, $x$ is approaching $1$; never actually equal to $1$.