  We propose a method to compute a desingularization of a normal affine variety
X endowed with a torus action in terms of a combinatorial description of such a
variety due to Altmann and Hausen. This desingularization allows us to study
the structure of the singularities of X. In particular, we give criteria for X
to have only rational, (QQ-)factorial, or (QQ-)Gorenstein singularities. We
also give partial criteria for X to be Cohen-Macaulay or log-terminal. Finally,
we provide a method to construct factorial affine varieties with a torus
action. This leads to a full classification of such varieties in the case where
the action is of complexity one.
