More generally, $A^3=A$ if and only if $A(A^2-I)=0$. Hence the minimal polynomial of $A$, $m_A(x)$ divides $x(x-1)(x+1)$, so the characteristic polynomial is $p_A(x)=x^i(x-1)^j(x+1)^k$ such that $i+j+k=2$. Take any matrix with all of it's eigenvalues $0,\pm1$ (some of those) and you will have a matrix satisfying your equation. There are some 'simple' matrices satisfying this equation: $\begin{pmatrix}0&0\\0&0\end{pmatrix},\begin{pmatrix}1&0\\0&1\end{pmatrix},\begin{pmatrix}-1&0\\0&-1\end{pmatrix}\\ \begin{pmatrix}0&0\\0&1\end{pmatrix},\begin{pmatrix}0&0\\0&-1\end{pmatrix},\begin{pmatrix}1&0\\0&-1\end{pmatrix}$ And those are all the 'different' matrices satisfying your equation. Any other solution to your equation is similar to one of those, i.e. take any invertible matrix $P$, take any matrix $E$ from the list I just mentioned and $A=PEP^{-1}$ is a solution.
In short - there are infinitely many solutions, each is of the form $A=PEP^{-1}$ for an invertible $P$ and $E$ from the six above.