Any local rings of length 2 are of the form $R/n^2$ with $(R,n)$ a regular local ring of dimension 1.
Any local rings of length 3 are of the form $R/n^2$ with $(R,n)$ a regular local ring of dimension 2 or $R/n^3$ with $(R,n)$ a regular local ring of dimension 1.
Proof for the length 3 case: Let $A,m,k$ be our ring. Then the exact sequence: $$ 0 \to m \to A \to k $$$$ 0 \to m \to A \to k \to 0 $$
shows that $length(m)=2$. So the number of generators of $m$ is at most 2. If it is 2, then $length(m/m^2)=2$, thus $m^2=0$. So $A=R/n^2$ with $(R,n)$ a regular local ring of dimension 2. If it is 1, then $A$ is a quotient of a regular local ring of dimension 1, and counting length shows that we need to kill the cube of the (principal) maximal ideal.
Of course, $R$ may or may not contains a field, so one may have things like $k[[x,y]]/(x^2,xy,y^2)$ or $Z_p[[x]]/(p^2,xp,x^2)$.
MORE: We can assume our regular $R$ is complete, since $A$, being Artinian, is complete. Then the Cohen Structure Theorem completely described $R$. If $R$ contains a field, then $R \cong k[[x,y]]$. If $R$ is mixed charateristic and unramified, then $R\cong V[[x]]$, with $(V,pV)$ a discrete valuation ring. If $R$ is ramified, then $R=V[[x,y]]/(f)$, with $f=p+g$ such that $g \in (x,y)^2$. From those you can get $A$ accordingly by killing the square of the maximal ideal.