Showing that $\mathcal V(Y^2-X^2+X)\subseteq \mathbb A_k^2$ has dimension $1$ I just want to confirm whether my understanding of this topic is generally correct.
$k$ is an algebraically closed field.
So basically, the dimension $\dim \mathcal V$ of $\mathcal V$ is the dimension of its coordinate ring $$A(\mathcal V(\mathfrak{p})) = k[X,Y]/{\mathcal I(\mathcal V(\mathfrak{p}))}$$ where $\mathcal I(\mathcal V(\mathfrak{p}))$ is the ideal of the variety $\mathcal V(\mathfrak{p})$ for $\mathfrak{p}=(Y^2-X^2+X)$.
Using Eisentein's irreducibility criterion using the prime element $p= X$ in $k[X][Y]$ confirms that $\mathfrak{p}$ is indeed a prime ideal in $k[X,Y]$, thus for $\sqrt{\frak{p}} = \frak{p}$ we obtain $\mathcal I(\mathcal V(\mathfrak{p})) = \frak{p}$.
Therefore, we obtain $\dim \mathcal V$ by computing $$\dim k[X,Y]/{\mathcal I(\mathcal V(\mathfrak{p}))} = \dim k[X,Y]/{\frak p} = 2-1 = 1$$

Question 1: Is my general understanding of this subject valid? I'm a bit uncertain because we introduced the notion of height $\operatorname{ht}({\frak p})$ of ${\frak p}$ as the supremum of the length all the prime ideal chains, but i'm not sure what its applications (in a problem like above) would be.
Question 2: Does every subvariety $\mathcal V(\frak a)$ of $\mathbb A_k^n$ have dimension $n-1$? How does the dimension of the variety $\mathcal V(\frak a)$ relate to chains of prime ideals?
I am clearly missing some connections.
Thanks for any help!
 A: Question 1. It looks like you've understood correctly how to compute dimensions of hypersurfaces (i.e. varieties defined by a single equation). Here are some clarifying remarks.
The height of a prime ideal is the supremum of the lengths of strictly ascending chains of prime ideals contained in $\mathfrak{p}$. Geometrically, this is the codimension of the subvariety defined by $\mathfrak{p}$.
For example, $\operatorname{height}(Xk[X,Y])=1$ (the maximal chain in question is $0\subset Xk[X,Y]$). This is a specific instance of an important result known as Krull's principal ideal theorem.

(Krull's principal ideal theorem) Let $A$ be a Noetherian ring, $f\in A$ not a unit. Then for any prime ideal $\mathfrak{p}$ minimal among those containing $f$, we have $\operatorname{height}(\mathfrak{p})\leq 1$.

Over any field we have the following:

Let $A$ be a finitely generated integral domain over $k$, and $\mathfrak{p}\subset A$ a prime ideal of height $1$. Then $\dim A/\mathfrak{p} = \dim A - 1$.

Now, if $f$ defines a non-zero prime ideal in an integral domain, then we must have $\operatorname{height}(fA)=1$ (clearly, it is at least $1$ since $0\subset fA$; Krull's theorem proves the reverse inequality). Therefore, by the second result we have $\dim A/fA=\dim A-1.$
Question 2. No, that is not the case in general. A point has dimension $0$, and can be defined by the ideal $(T_1-a_1,\dots,T_n-a_n)\subset k[T_1,\dots, T_n]$. So, unless $n=1$ it is not true that proper subvarieties are of dimension $n-1$.
The Krull dimension is the supremum of the heights of prime ideals. Equivalently, it is the supremum of the lengths of strictly ascending chains of prime ideals. This is how the dimension of the coordinate ring of a variety relates to chains of prime ideals. Geometrically, this corresponds to descending chains of irreducible closed subvarieties (e.g a surface $\supset$ a curve $\supset$ a point).
