Let $u=3x-2$. Then $\frac{du}{dx}=3$ and "therefore" $dx=\frac{du}{3}$. Our integral becomes $\int\frac{1}{3}u^{20}\,du$. This is a standard integral, we get $\frac{1}{63}u^{21}+C$. Finally, replace $u$ by $3x-2$.
There is an old joke that one replaces whatever is ugly by $u$, because $u$ is the first letter of the word "ugly." But in fact it is hard to give general rules for the strategy to use to attack an integral. Experience helps a lot: if you practice, after a while you recognize close relatives of problems you have already solved before.
You would use a very similar substitution if you wanted, for example, $\int\cos(17x-12)\,dx$. Just replace the ugly $17x -12$ by $u$. Note that $dx$ turns out to be $\frac{1}{17}du$.
Here is a fancier version of your problem. Find $\int(3x-6)(3x-2)^{20}\,dx$. Note that we could have solved your original problem by expanding $(3x-2)^{20}$, but that would have been a lot of work. We can also solve the new problem in the same way, but it would be. painful So let $3x-2=u$. Then $dx=\frac{du}{3}$, and $3x-6=u-4$. So our integral becomes
$$\int \frac{1}{3}(u-4)u^{20}\,du.$$
Now we can multiply $(u-4)$ by $u^{20}$, getting $u^{21}-4u^{20}$. So our integral becomes
$$\int \frac{1}{3}\left(u^{21}-4u^{20}\right)\,du,$$
not hard.
A last example! We want $\int x\sin(x^2)\,dx$. Substitute for the ugly inner function $x^2$, letting $u=x^2$. Then $\frac{du}{dx}=2x$, "so" $x\,dx=\frac{1}{2}du$. Substituting, we get $\int\frac{1}{2}\sin(u)\,du$, a standard integral. Remember, when we substitute, all traces of $x$ must disappear, meaning that $dx$ has to be expressed in terms of $du$. Note that in this case the $x$ in front helps, because it is almost $\frac{du}{dx}$, where $u=x^2$.