I want to factor this polynomial as a product of irreducible polynomial in $\mathbb{C}$ $f(x)=X^n - 1 \in \mathbb{R}[X]$
But I’m not sure how to do it. I know that $x^2 -1 is (x-1)(x+1)$ and that the only irreducible polynomial in $\mathbb{C}$ are of degree 1
The roots of $x^n -1$ in $\mathbb{C}$ are the roots of unity, which are of the form $$\displaystyle \exp\left({2\pi i \cdot \frac{k}{n}}\right)$$ for $0 \leq k < n$. Once you know the roots it is straightforward to factor. For instance, we have that $p(x) = x^3 - 1 = (x - 1)(x - e^{2\pi i/3})(x - e^{4 \pi i/3})$.