It doesn't. But if there is an elementary antiderivative, the Risch algorithm will find it (given the caveats listed in the Wikipedia article). But it might require a lot of substitutions, making its manual application impractical.
Another caveat is that Risch algorithm applies only to antiderivatives, not to the definite integrals. Some definite integrals can be computed without finding the antiderivative, often with the help of Feynman's trick.