Let y = cos⁻¹(x), so that cos(y) = x.
For some angle y between 0 and π, cos(y) takes on some value between -1 and 1.
For the y in this range, we have cos(y) = -1/2 exactly when y = 2π/3.
Then
tan(cos⁻¹(-1/2)) = tan(2π/3) = sin(2π/3)/cos(2π/3) = (√3/2)/(-1/2) = -√3