Without any further restrictions there is a huge array of solutions, particularly for infinite sets $E$. For instance, if you write $E$ is a disjoint union of doubletons $E=\bigcup D_i$, with $D_i=\{a_,b_i\}$, then defining $f:E\to E$ by $f(a_i)=b_i$ and $f(b_i)=a_i$, clearly solves $f\circ f \circ f=f$. This shows how random such functions can be as the decomposition of E into doubletons can be quite horrible.
In $R^n$, any reflection about a line solves the equation. Similarly, any rotation by $\pi$ radians about a point solves the equation. The identity function of course also solves the equation. The inversion $z\mapsto 1/z$ is also a solution.
All of these examples are actually ones where $f=f^-1$. Any such function will, of course, also solves your equation. So, if you include the condition that $f$ is bijective, then $f^{-1}$ exists, and then applying it to the equation yields $f\circ f = id$, in other words $f$ is an involution. In short, under the assumption of bijectivity, solutions to $f\circ f\circ f=f$ are the same as solutions to $f\circ f = id$.
Other solutions are obtained by writing $E$ as a disjoint union of doubletons and/or singletons, with $f$ defined similarly.