In general, a function is invertible only if each input has a unique output. That is, each output is paired with exactly one input. That way, when the mapping is reversed, it will still be a function!
For the graph of y = x3, no horizontal line intersects graph of f more than once. Therefore, f is invertible.