Tangent Spaces and Morphisms of Affine Varieties In page 205 of "Algebraic Curves, Algebraic Manifolds and Schemes" by Shokurov and Danilov, the tangent space $T_x X$ of an affine variety $X$ at a point $x \in X$ is defined as the subspace of $K^n$, where $K$ is the underlying field, such that $\xi \in T_x X$ if $(d_x g)(\xi)=0$ for any $g \in I$, where $I$ is the ideal of $K[T_1,\cdots,T_n]$ that defines $X$ and by definition $(d_x g)(\xi)=\sum_{i=1}^n \frac{\partial g}{\partial T_i}(x) \xi_i$, where partial derivatives are formal. So far so good. Next, it is mentioned, that if $f:X \rightarrow Y$ is a morphism of affine varieties, then we obtain a well-defined map $d_x f : T_x X \rightarrow T_{f(x)} Y$. How is this mapped defined and why is it well-defined?

Let $y = f(x)$.  Then f induces a map on stalks, which in turn induces a map on cotangent spaces:
$$\mathfrak{m}_{y,Y}/\mathfrak{m}_{y,Y}^2 \rightarrow \mathfrak{m}_{x,X}/\mathfrak{m}_{x,X}^2$$
Taking the dual over $K$ yields the map on tangent spaces.  
To put this into context, your definition of the tangent space makes use of the explicit basis
$$\frac{\partial}{\partial T_i} \bigg|_x$$
That is, partial derivation with respect to the variable $T_i$, followed by evaluation at $x$.
