If $f\in C(M)$ is a smooth function on $M$ (I am dropping the "$\infty$" sign, since all functions shall be smooth), and $v\in T_xM$ is a tangent vector then the assignment $v\mapsto v(f)$ is a linear operation $T_xM\rightarrow\mathbb R$, so in some sense, a smooth function is also a linear functional on $T_xM$, thus is an element of the dual space $T^\ast_x M$.
There is a problem with this interpretation however, is that dual spaces are required to be separating. Eg., if $V$ is a vector space, and $V^\ast$ is its (algebraic) dual, we demand that for any $\omega,\omega^\prime\in V^\ast$ can be told apart by how they act on elements of $V$. In other words, if $\omega(v)=\omega^\prime(v)$ for all $v\in V$, then we must have $\omega=\omega^\prime$.
There are however functions $f,f^\prime\in C(M)$ (prime is not a derivative here) such that $v(f)=v(f^\prime)$ for all $v\in T_xM$. The prudent thing to do then is to identify the annihilator $T^0_xM\subset C(M)$ consisting of functions $f$ that satisfy $v(f)=0$ for all $v\in T_xM$. Then we clearly have $T^\ast_xM=C(M)/T^0_xM$.
This procedure is best carried out in two steps. First one should note that all tangent vectors have the following two properties:
- If $v\in T_xM$ is an arbitrary vector and $f\equiv c$ is a constant function, then $v(f)=0$.
- If $v\in T_xM$ is an arbitrary vector and $f=gh$, where $g(x)=h(x)=0$ (but only necessarily for the specific point $x$, they do not have to vanish identically), then $v(f)=0$.
One may then define the space $\mathcal I_x\subset C(M)=\{f\in C(M):\ f(x)=0\}$ consisting of functions that vanish at $x$. This a subring of $C(M)$ and is also a two-sided ideal, since it is stable under multipliction from outside of $\mathcal I_x$.
We have for any $v\in T_xM$ the relation $v(f)=v(f-f(x))$, since $f(x)$ is just a constant (the value of $f$ at $x$), and the map $f\mapsto f-f(x)$ is a projection from $C(M)$ to $\mathcal I_x$, so the action of $T_xM$ on $C(M)$ descends to an action on $\mathcal I_x$ without any loss of information. Thus, we succeeded in "quotienting out" a portion of the annihilator $T^0_xM\subset C(M)$ without actually taking a quotient, since the only constant function remaining in $\mathcal I_x$ is the one that is identically zero.
There is still the issue of an arbitrary tangent vector $v$ being zero on products of the form $f=gh$ with $g,h\in\mathcal I_x$. We first note that ideals can be multiplied, eg. $\mathcal I_x^2$ is the ideal in $C(M)$ generated by expressions of the form $fg$ where $f,g\in\mathcal I_x$. The "second" property of tangent vectors corresponds precisely to the statement
$$\text{All tangent vectors annihilate }\mathcal I_x^2.$$
Thus we can get rid of this subspace by taking the quotient $\mathcal I_x/\mathcal I_x^2$. The action of an arbitrary $v\in T_xM$ tangent vector factors through the quotient. In fact, let $[\cdot]$ denote the quotient projection $\mathcal I_x\rightarrow \mathcal I_x/\mathcal I_x^2$, then we define the differential of a function $f\in C(M)$ at $x\in M$ as $$ \mathrm df_x=[f-f(x)]\in\mathcal I_x/\mathcal I_x^2, $$ then if we define $$ \mathrm df_x(v)=v(f),$$ this doesn't depend on which $f$ we choose from the same class.
At this point, we cannot be sure that we cannot quotient out any more subspaces from $C(M)$, however one can prove that the space $\mathcal I_x/\mathcal I_x^2$ is finite $n$ dimensional (and it is only a linear space, the algebra structure is lost during the quotient, since products of functions are quotiented into the zero element).
The standard proof involves a Taylor expansion with remainder. Heuristically, without using the precise form of the remainder term, we can write $$ f=f(x)+\partial_\mu f(x)(x^\mu-x^\mu(x))+\mathcal I_x^2, $$ where the last expression means that the remainder is of the form $(x^\mu-x^\mu(x))(x^\nu-x^\nu(x))g$, so it is in $\mathcal I_x^2$. Applying the differential $\mathrm d_x$ into this expression gives $$ \mathrm df_x=\mathrm d(f(x))_x+\partial_\mu f(x)\mathrm d(x^\mu-x^\mu(x))_x+\mathrm d(\mathcal I_x^2)_x=\partial_\mu f(x)\mathrm dx^\mu_x, $$ and since $\mathrm d_x$ is the composition of two projections it is necessarily surjective. Thus we see that for any local chart, the elements $\mathrm dx^\mu_x$ span $\mathcal I_x/\mathcal I_x^2$, and linear independence can also be easily established, thus $\dim T_xM=\dim(\mathcal I_x/\mathcal I_x^2)$. This however implies that $\mathcal I_x/\mathcal I_x^2$ is the dual space of $T_xM$, since there are no subspaces left to quotient out anymore.
Interpretation:
The procedure $$ C(M)\rightarrow\mathcal I_x\rightarrow \mathcal I_x/\mathcal I_x^2$$ involves gradually removing all elements from the space of functions $C(M)$ which indiscriminately annihilate all tangent vectors, thus in this way we arrive at the "true" dual space of $T_xM$ where each element can be told apart by how they act on tangent vectors (or how tangent vectors act on them).
If wer use a generalized Taylor expansion in a chart $$ f=f(x)+\partial_\mu f(x)(x^\mu-x^\mu(x))+\frac{1}{2}\partial_\mu\partial_\nu f(x)(x^\mu-x^\mu(x))(x^\nu-x^\nu(x))+O((x-x(x))^3), $$ we see that the first, constant term $f(x)$ gets cut off when we move from $C(M)$ to $\mathcal I_x$, and we also see that the secomnd, third and all higher order terms contain factors of the form $(x-x(x))^2$, thus they belong to $\mathcal I_x^2$. Taking the quotient $\mathcal I_x/\mathcal I_x^2$ essentially involves getting rid of every term in the Taylor expansion aside from the first order term, and what we remain with is $ \partial_\mu f(x)(x^\mu-x^\mu(x))$.
Now, we know that covectors on a manifold are essentially first-order partial derivatives of functions. What we did by this quotienting procedure (by moving $f$ to $\mathrm df_x$) was essentially that we differentiated the function $f$ in a purely algebraic manner. Thus, we constructed the space of first-order partial derivatives of functions, eg. the cotangent space.