From these notes, https://www.dpmms.cam.ac.uk/~md384/neessnmeiwseis.pdf, definition 2.6:
A derivation $D$ at $p$ is a mapping $D:X(p) \rightarrow \mathbf{R}$ satisfying $D(\lambda f+\mu g)= \lambda D f + \mu D g$, for $\lambda, \mu$ scalars, and, in addition, $D(fg)=D(f)g(p)+f(p)(Dg)$
Then proposition 2.4 states that the set of derivations at p define vector space of dimension n, denoted $T_pM$
How do we know that the properties of the derivation with lead to a tangent space, see

Another definition of the tangent space sometimes used is that it is the space of tangent vectors to curves passing through $p$. That is, take the collection of all smooth parameterized curves $\gamma \colon (-\varepsilon,\varepsilon) \to X$ with $\gamma(0) = p$. If we take the tangent vector $\gamma'(0)$, we can picture this as a vector based at $p$ which is tangent to $X$, like in the picture you included.
The connection between this picture and the "derivation" definition is the following. Each such tangent vector defines an abstract derivation on the space of functions. This derivation is simply the directional derivative in the direction that $\gamma'(0)$ points. More technically, define $D_\gamma$ to be
$$ D_\gamma(f) = \lim_{t \to 0} \frac{f(\gamma(t)) - f(0)}{t} $$
Then $D_\gamma$ satisfies the Leibniz rule: $D_\gamma(fg) = D_\gamma(f) \cdot g + f \cdot D_\gamma(g)$, and so it is a derivation.