5 added 294 characters in body

UPDATE: My answer essentially just gives the definition of Kahler differentials and differential forms and misses the point of the question. Georges' answer addresses the relationship between the two. As David before me, I also encourage you to vote Georges' answer up and mine down.

Let $M$ be a smooth manifold and $p$ a point in $M$. The usual definition of the tangent space to $M$ at $p$ is as the vector space of linear maps $D: C^{\infty}(M) \to \mathbb{R}$ satisfying the Leibniz rule $$D(fg) = D(f)g(p) + f(p)D(g)$$ Equivalently, let $I$ be the ideal of $C^{\infty}(M)$ consisting of all functions vanishing at $p$. Then $T_p M$ is the dual of the vector space $I/I^2$ (which you hence call the cotangent space to $M$ at $p$). Indeed, $D(f) = 0$ for every $f \in I^2$, and conversely any linear map $r: I/I^2 \to \mathbb{R}$ gives rise to a derivation $D(f) := r(f-f(p))$.

Now let $X$ be a scheme over a field $k$ (you can generalize this to a morphism of schemes) and $x$ a closed point. Consider the local ring $\mathcal{O}_{x, X}$ of functions regular at $X$. Then the stalk at $x$ of the sheaf of Kahler differentials $\Omega^1_X$ corepresents the functor taking an $\mathcal{O}_{x,X}$-module $\mathcal{F}_x$ to $\mathrm{Der}(\mathcal{O}_{x,X}, \mathcal{F}_x)$. In particular, $$\mathrm{Der}(\mathcal{O}_{x,X}, k) \cong \mathrm{Hom}(\Omega^1_{X,x}, k)$$

It is in this sense that you think of $\Omega^1_{X,x}$ as the cotangent space to $X$ at $x$. Indeed, in this case $\Omega^1_{X,x} \cong m/m^2$ where $m \subset \mathcal{O}_{x, X}$ is the ideal of functions vanishing at $x$.

4 Clarified how $\Omega^1_{X,x}$ corepresents derivations.; added 2 characters in body

Let $M$ be a smooth manifold and $p$ a point in $M$. The usual definition of the tangent space to $M$ at $p$ is as the vector space of linear maps $D: C^{\infty}(M) \to \mathbb{R}$ satisfying the Leibniz rule $$D(fg) = D(f)g(p) + f(p)D(g)$$ Equivalently, let $I$ be the ideal of $C^{\infty}(M)$ consisting of all functions vanishing at $p$. Then $T_p M$ is the dual of the vector space $I/I^2$ (which you hence call the cotangent space to $M$ at $p$). Indeed, $D(f) = 0$ for every $f \in I^2$, and conversely any linear map $r: I/I^2 \to \mathbb{R}$ gives rise to a derivation $D(f) := r(f-f(p))$.

Now let $X$ be a scheme over a field $k$ (you can generalize this to a morphism of schemes) and $x$ a closed point. Consider the local ring $\mathcal{O}_{x, X}$ of functions regular at $X$. Then the stalk at $x$ of the sheaf of Kahler differentials $\Omega^1_X$ represents derivations: corepresents the functor taking an $$Der(\mathcal{O}_{x,X}, \mathcal{O}_{x,X}-module \mathcal{F}_x to \mathrm{Der}(\mathcal{O}_{x,X}, \mathcal{F}_x). In particular, $$\mathrm{Der}(\mathcal{O}_{x,X}, k) \cong \mathrm{Hom}(\Omega^1_{X,x}, \mathcal{O}_{x,X})$$k)$$

It is in this sense that you think of $\Omega^1_{X,x}$ as the cotangent space to $X$ at $x$. Indeed, in this case $\Omega^1_{X,x} \cong m/m^2$ where $m \subset \mathcal{O}_{x, X}$ is the ideal of functions vanishing at $x$.

3 added 166 characters in body; deleted 35 characters in body

Let $M$ be a smooth manifold and $p$ a point in $M$. The usual definition of the tangent space to $M$ at $p$ is as the vector space of linear maps $D: C^{\infty}(M) \to \mathbb{R}$ satisfying the Leibniz rule $$D(fg) = D(f)g(p) + f(p)D(g)$$ Equivalently, let $I$ be the ideal of $C^{\infty}(M)$ consisting of all functions vanishing at $p$. Then $T_p M$ is the dual of the vector space $I/I^2$ (which you hence call the cotangent space to $M$ at $p$). Indeed, $D(f) = 0$ for every $f \in I^2$, and conversely any linear map $r: I/I^2 \to \mathbb{R}$ gives rise to a derivation $D(f) := r(f-f(p))$.

Now let $X$ be a scheme over a field $k$ (you can generalize this to a morphism of schemes) and $x$ a closed point. Consider the local ring $\mathcal{O}_{x, X}$ of functions regular at $X$. Then the stalk at $x$ of the sheaf of Kahler differentials $\Omega^1_X$ represents derivations: $$Der(\mathcal{O}_{x,X}, k) \cong \mathrm{Hom}(\Omega^1_{X,x}, \mathcal{O}_{x,X})$$ It is in this sense that you think of $\Omega^1_{X,x}$ as the cotangent space to $X$ at $x$. Indeed, in this case $\Omega^1_{X,x} \cong m/m^2$ where $m \subset \mathcal{O}_{x, X}$ is the ideal of functions vanishing at $x$.

Post Undeleted by Alberto García-Raboso