A function $f$ is not differentiable at $a$ if it has no tangent at $a$. I am a bit confused by the above statement from a textbook I am using. A tangent line is a line that touches a curve at a certain point, looking at $|x|$, it is not differentiable at 0 but isn't the x-axis tangent to this curve at 0? please help me understand.
 A: Given a curve $C$ and a point $P$ on $C$, what does it mean to say that a line $L$ is tangent to $C$ at $P$?
Well, the first requirement is that $L$ passes through $P$. But, there are many different lines that pass through $P$. So, for instance, if $C$ is the graph of $y=|x|$ and if $P=(0,0)$ then the line $y=0$ passes through $P$, and the line $x=0$ passes through $P$, and the line $y=x$ passes through $P$, and the line $y=.01x$ passes through $P$. 
What's so special about tangent lines?
The additional special property of the tangent line is not just that it passes through $P$, but that at points of the curve $C$ nearby $P$ the tangent line $L$ is a very good approximation of $C$. Intuitively, what this means is that if you took a microscope and looked at the region around $P$ through that microscope, the curve $C$ and the line $L$ would look very much like each other near $P$, but perhaps $C$ curves a bit away from $L$ somewhat. But then you have to repeat this intuition with more and more powerful microscopes. If you take a very powerful microscope, and looked at the region around $P$ through that microscope, the curve $C$ and the line $L$ would look very very much like each other near $P$, but perhaps $C$ curves a very little bit away from $L$.
Now let's apply this intuition to the case of $y=|x|$ and $P=(0,0)$. No matter how powerful of a microscope you take, when you look at the region around $P$ the graph of $y=|x|$ and the line $y=0$ look nothing like each other, other than the fact that they both contain $P$. So no, the line $y=0$ is not a tangent line to $y=|x|$, and in fact there does not exist any line is tangent to $y=|x|$ at $P$.
Of course, all these notions of very very close seem rather intuitive. But that's the point of calculus: it makes those kind of notions logically precise, using the concept of a limit. And when you make the definition of tangent line precise, for example as in the answer of @Griboullis, then you will also see that $y=|x|$ has no tangent line at $(0,0)$.
A: The linear function $g(x) = \alpha x + \beta$ is tangent to $f$ at point $a$ if
\begin{equation}
\lim_{x\to a}\frac{f(x)-g(x)}{x-a} = 0
\end{equation}
If this is true, it implies that $f(a) = g(a)$ and
\begin{equation}
\frac{f(x) - f(a)}{x -a} = \frac{f(x)-g(x)}{x-a} + \frac{g(x)-g(a)}{x-a}
= \frac{f(x)-g(x)}{x-a} + \alpha \longrightarrow_{x\to a} \alpha
\end{equation}
Hence $f$ is differentiable and its derivative at point $a$ is $\alpha$
A: An answer at the intuitive level : 
Suppose that there is a moving object following the path determined by a  curve. 
Suppose that at a certain point P of this curve, the object leaves the curve and continues its way,  by pure inertia. 
The object would move along a straight line. 
Now, this straight line is the tangent of the curve at point P just in case these 2 conditions are both fulfilled: 
(1) this line is different from the original curve 
(2) and this line is the same, in whatever sense the object is moving ( be it from the right to the left, or from the left to the right). 
Now, suppose an object leaved the |x| curve at (0,0) : this object would not follow the same line in case it would come from the left and in case in would come from the right. 
Note : The " uniqueness condition " ( condition 2) is analogous to the uniqueness condition in the definition of " the " limit of a function f as x approaches a given value; in order to be allowed to talk about " the" limit of f (when x tends to this value) ,  the so-called limit has to be the same as x approches this value from the right and from the left  .
