Classifying Unital Commutative Rings of Order $p^2$
In a unital ring $R$ of order $p^2$ the additive order of $1$ can only be $p$ or $p^2$. In the second case, $1$ generates the additive group, so it is clear that the ring itself is isomorphic to $\mathbb Z/(p^2)$. So we concentrate in the first option.
In that case all non-zero elements have additive order $p$, so the ring is in fact a $2$-dimensional $\mathbb F_p$-algebra. Pick any element $x\in R$ which is linearly independent with $1$, so that $\{1,x\}$ is a basis. We must have $x^2=a+bx$ for some $a$, $b\in\mathbb F_p$, and then $R$ is isomorphic to $\mathbb F_p[X]/(X^2-aX-b)$.
If $X^2-aX-b$ is irreducible over $\mathbb F_p$, then $R$ is a field, and there is only one field of order $p^2$: $\mathbb F_{p^2}$. If not, then it factors as $(X-\alpha)(X-\beta)$ over $\mathbb F_p$. It is easy to see now that if $\alpha\neq\beta$ we have $R\cong\mathbb F_p\times\mathbb F_p$ and if $\alpha=\beta$ then $R\cong\mathbb F_p[X]/(X^2)$.
Interestingly, the fact that $R$ is commutative plays no role here, and there are no non-commutative rings of order $p^2$.
For fun, let us suppose now that $R$ does not have a unit, and let us see what happens.
First, suppose the addititive group is cyclic, so that there is an additive generator $x\in R$ of order $p^2$. Then there is an $n\in\{0,\dots,p^2-1\}$ such that $x^2=nx$. It is clear that the isoclass of $R$ is determined by $n$. But there is an ambiguity, as there are other generators: any other generator of the additive group is of the form $ax$ with $a$ a unit of $\mathbb Z/(p^2)$. If instead of $x$ we had started with $y=ax$, then as $y^2=a^2x^2=a^2nx=any$, instead of $n$ we would have found $an$. It follows that the isomorphism classes of rings of this form are parametrized by the quotient of $\mathbb Z/(p^2)$ under the action of its group of units given by left multiplication. If I did not get this too wrong, there are three orbits: the one for $0$, the one for $1$ and the one for $p$, so there are three rings of this type.
Second, let us suppose that the additive group is not cyclic, so that all non-zero elements have order $p$, and $R$ is in fact a $\mathbb F_p$-vector space.
Suppose there is a non-zero idempotent $e\in R$. Let $\lambda:a\in R\mapsto ea\in R$ and $\rho:a\in R\mapsto ae\in R$. These are two idempotent $\mathbb F_p$-linear maps which commute. Linear algebra tells us then that there is a direct sum decomposition $$R=R_{00}\oplus R_{10}\oplus R_{01}\oplus R_{11}$$ with \begin{align} &R_{00}=\{x\in R:ex=xe=0\},\\ &R_{10}=\{x\in R:ex=x, xe=0\},\\ &R_{01}=\{x\in R:ex=0, xe=x\}, \\ &R_{11}=\{x\in R:ex=xe=x\}. \end{align} At most two of these subspaces can be non-zero, and we know that $R_{11}$ contains $e$. Also, $R_{11}$ cannot be all of $R$ because we are supposing there is no unit.
If there is a non-zero element in $R_{10}$, call it $x$. Then $\{e,x\}$ is a basis, $ex=x$, $xe=0$ and $xx=x(ex)=(xe)x=0x=0$. The multiplication is therefore completely determined.
Similarly, if there is a non-zero element $x\in R_{01}$, $\{e,x\}$ is again a basis, and we have $ex=0$, $xe=x$ and $xx=0$.
Finally, if there is a non-zero element $x\in R_{00}$, we have $ex=xe=0$. Then $ex^2=(ex)x=0$ and similarly $x^2e=0$, so $x^2$ is too in $R_{00}$, and there is a scalar $a$ such that $x^2=ax$. If $a\neq0$, we let $y=a^{-1}x$, so that $y^2=a^{-2}x^2=a^{-1}x=y$, and since $\{e,y\}$ is a basis this determines the multiplication. If $a=0$, of course the multiplication is also fixed.
We are left with the case in which there are no non-zero idempotents in $R$. A classical theorem of Albert implies that all non-zero elements must be nilpotent. If there is an $x\in R$ which is non-zero and such that $x^2$ is linearly independent with $x$, then $\{x,x^2\}$ is a basis, and we must have $x^3=0$, for the map $a\in R\mapsto xa\in R$, being a nilpotent endomorphism of a vector space of dimension $2$, must have nilpotency index at most $2$. We see that the multiplication table is completely determined here too.
Finally, suppose all non-zero elements are nilpotent but for for each $x$ of them, we have that $x^2$ is a linear multiple of $x$. All elements of $R$ must therefore square to zero. Let $\{x,y\}$ be a basis, and suppose $xy=ax+by$ and $yx=cx+dy$. Then $0=(x+y)^2=(a+c)x+(b+d)y$, so $yx=-xy$. Now call $u=xy$. If $u$ is zero, then all products are zero. If $\{x,u\}$ is a basis, then we know its the multiplication, as $x^2=u^2=xu=ux=0$. If not, $\{y,u\}$ is a basis, and again all products are zero.
What a strange coincidence: I've been wasting a bunch of time recently thinking about principal Artinian rings. Now every commutative, unital ring of order $p^2$ is principal: indeed, every nonzero proper ideal must in particular have order $p$ so is even generated as an additive subgroup by any one nonzero element.
Step 1: The only (commutative, unital: this will be omitted from now on) ring of order $p$ is $\mathbb{Z}/p\mathbb{Z}$. For instance, it must have a maximal ideal and a residue field, and the size constraints force the maximal ideal to be $(0)$ and the residue field to have order $p$.
Step 2: Every finite ring is an Artinian ring, hence isomorphic to a product of Artinian local rings. So for rings of order $p^2$, the only one which is a nontrivial product is $\mathbb{Z}/p\mathbb{Z} \times \mathbb{Z}/p \mathbb{Z}$. The others are local Artinian principal rings. Let $R$ be such a ring of order $p^2$.
Step 3: It is easy to see that the characteristic of $R$ is either $p^2$ or $p$ and in the former case we must have $R \cong \mathbb{Z}/p^2 \mathbb{Z}$.
Step 4: Suppose that $R$ has characteristic $p$. If the unique maximal ideal if $(0)$, then $R \cong \mathbb{F}_{p^2}$ is the finite field of order $p^2$. Otherwise the maximal ideal is generated by an element $t$ with $t^2 = 0$. From this it is easy to see that $R \cong (\mathbb{Z}/p \mathbb{Z})[t]/(t^2)$.
Final tally: $R$ is one of
$\mathbb{Z}/p \mathbb{Z} \times \mathbb{Z} / p \mathbb{Z}, \ \mathbb{Z}/p^2 \mathbb{Z}, \mathbb{F}_{p^2}, \ (\mathbb{Z}/p\mathbb{Z})[t]/(t^2)$.