How, in three dimensions, is tangent line defined in the case $f'(x)=0$? Let $f:(a\,..b)\rightarrow \mathbb R^3$. Let $f$ be differentiable on $(a\,..b)$, where $f'(x)=\big(f_x'(x),f_y'(x),f_z'(x)\big)$. Let $0$ mean the zero vector.
First, we know that the line must pass through $f(x_0)$. Second, it must also pass through $f(x_0)+f'(x_0)$. 
The case is easy when the points are unequal - in other words, $f(x_0)\neq f'(x_0)+f(x_0)$. In this situation, we can use the popular equation of a line passing through two different points $\alpha$ and $\beta$: $l(x)=x \alpha +(1-x) \beta$, which here becomes $t(x)=x(f(x_0)+f'(x_0))+(1-x)f(x_0)$. Defining a tangent poses no problem in this case.
What, however, about the case $f'(x_0)=0$? Here the equation above becomes useless - $f(x_0)+f'(x_0)=f(x_0)$, and therefore we can't use the formula to define a tangent to $f(x_0)$.
The tangent line intuitively exists in at least some of such cases - for example, if we take each of the components of $f(x_0)$ to be a local maximum, then $f'(x_0)=0$ and yet we intuitively know that a line tangent to $f(x_0)$. 
How to define such a line in this case, then?
 A: If a smooth path $f$ satisfies $f'(x_{0}) = 0$ for some $x_{0}$, there may exist a tangent line to the image, but there need not exist a tangent line:


*

*The smooth path $f(x) = (x^{3}, 0, 0)$ traces the $x$-axis, which has a tangent line at $0$, but $f'(0) = 0$.

*The smooth path $f(x) = (\cos^{3} x, \sin^{3} x, 0)$ traces an astroid curve, which fails to have a tangent line at each cusp (i.e., when $x$ is an integer multiple of $\pi/2$).
This is why, in differential geometry, one focuses not on smooth (differentiable to some degree) paths, but on regular paths (smooth, and with nowhere-vanishing derivative).
It may help to notice that a graph $y = g(x)$ may be parametrized by $f(x) = (x, g(x))$. If $g$ is smooth, then $f'(x) = (1, g'(x))$, so $f$ is regular as long as $g$ is smooth. This is likely the origin of your intuition that "every smooth path has a tangent line".
A: I would argue that it is not appropriate to define
the tangent line of a curve defined by some arbitrary three-dimensional
function $f(t) = (f_x(t), f_y(t),  f_z(t))$ at $f(t_0)$
as the line that passes through the points 
$f(t_0)$ and $f(t_0) + f'(t_0).$
I think it is true that when a tangent line exists at $f(t_0)$ and the
derivative $f'(t_0)$ also exists,
then the tangent line passes through $f(t_0) + f'(t_0).$
If it happens that $f'(t_0) \neq 0,$ then this relationship enables us
to identify the tangent line at $f(t).$
But consider the curve defined by
$$
f(t) = \left(\cos\left(\frac\pi2 t^3\right),
             \sin\left(\frac\pi2 t^3\right), 0\right)
$$
for $t \in [-1,1].$
This is a semicircle through $(0,-1,0),$ $(1,0,0),$ and $(0,1,0),$
traced once in the direction from $(0,-1,0)$ to $(0,1,0),$ 
and it clearly has a tangent at $(1,0,0)$ even though $f'(0) = (0,0,0).$
You can resolve problems like this by defining tangent more carefully.
See "The Definition of a Tangent to a Curve" by T. M. Flett, for example, which mentions that

It  must  be  emphasised  that  there  is  no  correlation  between  the
  existence  of  (continuous)  tangents  and  the  existence   of   (continuous) derivatives.

One resolution of the problem would be to make the tangent at $f(t_0)$ a limit of the secant lines through points on the curve in the neighborhood
of $f(t_0).$ But you have to be careful how you define that limit.
A quicker resolution of the problem would be to
require that the tangent be defined always relative to a
parameterization of the curve by a function $f$ such that $f' \neq 0.$
This leads you to look at "regular paths" as defined in the answer by Andrew D. Hwang.
A: Perhaps the line goes away in a different direction, for example (t2,t2,t|t|)
arrives along (1,1,1) and leaves along (1,1,−1). 
If the functions are smooth, you can take Taylor series, and use the leading-order that involves $t$, so $(2+t^2+t^3,1+2t^2-t^3,3+6t^2)$ has tangent in direction $(1,2,6)$  
You might re-parametrise, so in the previous case, let $t=\sqrt{u}$ and, at least for positive $t$, the leading-order is $(2+u,1+2u,3+6u)$
A: The derivative you have defined is a vector (of course). It tells you both the direction and the speed (the length of the derivative) of motion along the curve as the parameter $x$ increases. It may happen that the speed is (momentarily) $0$ - but that can depend on the parameterization. If you replace $x$ by some smooth monotone increasing function of $x$ you will change the speeds but not the directions of the tangent vectors. It's usual to choose a parameterization that never has velocity $0$. The natural parameter is the arclength of the curve. That may not be easy to compute in a particular example (the integral can be ugly) but it makes the most geometric sense.
