Proof (variety of dimension 0)

Let $X_0$ be an irreducible component of $X$. By definition, $\dim X_0 = 0$.

As transcendence degree of $k(X_0)$ equals 0, $k(X_0)$ is algebraic over $k$, so equals $k$ (as $k$ is algebraically closed).

Over an affine patch of $X_0$, the coordinate functions $x_1, \ldots, x_n\in k(X)$ are then constants $a_1, \ldots, a_n\in k$, so the affine patch is contained in $\set{(a_1, \ldots, a_n)}\subseteq \mathbb{A}^n$. Unionising over all affine patches and irreducible components of $X$ shows $X$ is a finite union of points.