Find a $4\times 4$ matrix $A$ where $A\neq I$ and $A^2 \neq I$, but $A^3 = I$. Give an example of a $4 \times 4$ matrix where $A \neq I$, $A^2 \neq I$, and $A^3 = I$.
I found a $2 \times 2$ matrix where $A \neq I$ and $A^2 = I$, but this problem is more complex and has me completely stumped.

Here is a $2\times2$ example
$$
\begin{bmatrix}
-\frac12&\frac{\sqrt{3}}{2}\\
-\frac{\sqrt{3}}{2}&-\frac12
\end{bmatrix}\tag{1}
$$
This works because it is a matrix representation of $e^{2\pi i/3}=-\frac12+i\frac{\sqrt{3}}{2}$; that is, a rotation by $\frac{2\pi}{3}$. Thus, squaring it gives another $2\times2$ example
$$
\begin{bmatrix}
-\frac12&-\frac{\sqrt{3}}{2}\\
\frac{\sqrt{3}}{2}&-\frac12
\end{bmatrix}\tag{2}
$$
$(1)$ and $(2)$ can easily be extended to $4\times4$ examples in many ways. Here is one using $(1)$:
$$
\begin{bmatrix}
-\frac12&\frac{\sqrt{3}}{2}&0&0\\
-\frac{\sqrt{3}}{2}&-\frac12&0&0\\
0&0&\hspace{7pt}1\hspace{7pt}\vphantom{-\frac12}&0\\
0&0&0&\hspace{5pt}1\hspace{5pt}\vphantom{-\frac12}
\end{bmatrix}\tag{3}
$$
Yet another $2\times2$ matrix:
As Hagen von Eitzen points out, we can consider the unit vectors $u,v,w$, which are separated by $\frac{2\pi}{3}$
$\hspace{5cm}$
and note that $u+v+w=0$ to get that $w=-u-v$. Let $\begin{bmatrix}a\\b\end{bmatrix}$ be a coordinate vector using the basis vectors $\{u,v\}$. Then rotation by $\frac{2\pi}{3}$ has the following action:
$$
\begin{bmatrix}u&v\end{bmatrix}\begin{bmatrix}a\\b\end{bmatrix}\mapsto\begin{bmatrix}v&w\end{bmatrix}\begin{bmatrix}a\\b\end{bmatrix}=\begin{bmatrix}u&v\end{bmatrix}\begin{bmatrix}0&-1\\1&-1\end{bmatrix}\begin{bmatrix}a\\b\end{bmatrix}\tag{4}
$$
Thus, the matrix for rotating by $\frac{2\pi}{3}$ under the basis $\{u,v\}$ is
$$
\begin{bmatrix}0&-1\\1&-1\end{bmatrix}\tag{5}
$$
which, as Gerry Myerson points out, is the companion matrix for $x^2+x+1$. A companion matrix is annihilated by its polynomial, so $(5)$ is annihilated by $x^3-1=(x-1)(x^2+x+1)$.
The square of $(5)$ also satisfies the specified conditions:
$$
\begin{bmatrix}-1&1\\-1&0\end{bmatrix}\tag{6}
$$
The answer given by Marc van Leeuwen uses $(6)$.
