If ##z^3-1=0## then we are looking for the cubic roots of unity i.e. the numbers such that ##z^3=1##.
If you’re using complex numbers then every polynomial equation of degree ##k## yields exactly ##k## solution. So we’re expecting to find three cubic roots.
De Moivre’s theorem uses the fact that we can write any complex number as ##rho e^{i theta}= rho (cos(theta)+isin(theta))## and it states that if
##z=rho (cos(theta)+isin(theta))## then
##z^n = rho^n (cos(n theta)+isin(n theta))##
If you look at ##1## as a complex number then you have ##rho=1## and ##theta=2pi##. We are thus looking for three numbers such that ##rho^3=1## and ##3theta=2pi##.
Since ##rho## is a real number the only solution to ##rho^3=1## is ##rho=1##. On the other hand using the periodicity of the angles we have that the three solutions for ##theta## are
##theta_{123}=frac{2kpi}{3}## for ##k=012##.
This means that the three solutions are: