Hironaka's theorem states that for any algebraic variety (analytic space) $X$ there exists a smooth variety (complex manifold) $X'$ and a morphism $f : X' \rightarrow X$ such that $f$ restricted to $X \backslash \, f^{1}X$ is an isomorphism of $X' \backslash \, f^{1}X$ with the nonsingular locus of $X$ and $f^{1}X$ has only simple normal crossings. Moreover, $X'$ can be constructed as a finite sequence of blowups and in a way such that this construction is functorial. In Dmodules, Perverse Sheaves, and Representation Theory many times the authors claim that thanks to this theorem we know that there exists a smooth completion of any smooth quasiprojective algebraic variety. Sincerely, I don't understand how to use the theorem to prove this statement.

$\begingroup$ Your statement of the theorem is mangled  you wish to remove $f^{1} X$ from $X$? I think you mean to state the version with an auxiliary closed subset $Z$, and want $X' \setminus f^{1} Z \cong X \setminus Z$ and $f^{1} Z$ to have simple normal crossings. $\endgroup$ – Will Sawin Jun 13 '18 at 9:29

2$\begingroup$ Anyways you want to name your smooth quasiprojective algebraic variety $U$, embed it in projective space, let $X$ be the closure, and find $X'$. Because $X$ is complete, and $X'$ is produced by blowups, $X'$ is complete, and by the statement you gave $X'$ is smooth and contains $U$ as an open subset (of the nonsingular locus). $\endgroup$ – Will Sawin Jun 13 '18 at 9:31

$\begingroup$ Yes, sorry, I meant to cut the singular locus from $X$ and the preimage of the singular locus from $X'$. $\endgroup$ – Federico Barbacovi Jun 13 '18 at 9:35
Let $\bar{X}$ be any projective completion of $X$ ($\bar{X}$ is projective and $X$ is contained in $\bar{X}$ as a dense Zariski open subset). Now $\bar{X}\backslash X$ is a closed subvariety of $\bar{X}$ so you can resolve it into a simple normal crossing divisor while $X$ stays unchanged (by a finite sequence of blowups on $\bar{X}$ whose centers lie over $\bar{X}\backslash X$, as mentioned in the question). Since blowups are relatively projective, you even get a projective smooth completion by adding a simple normal crossing divisor.