The Weierstrauss substitution is useful when you have a function you want to integrate that's a rational function in terms of trig functions. The without loss of generality means that if your function involves things like $\tan x,\csc x$, etc, then you can just write $\tan x = \frac{\sin x}{\cos x}$ and $\csc x = \frac{1}{\sin x}$, etc, to get it all in terms of $\sin$ and $\cos$.
Now, the Weierstrauss substitution doesn't give us the answer directly. Imagine we have some function $f$ (you can choose one from here if you can't think of any) such that:
$$f(x) = \frac{N(\sin x,\cos x)}{D(\sin x,\cos x)}$$
By this, I mean that both the numerator ($N$) and denominator $(D)$ are functions of $\sin x,\cos x$ - specifically polynomial in terms of them.
So, if we have an $f$ like that, we can apply the Weierstrauss substution, and it will rewrite $f$ as:
$$f(x) = \frac{N_1(x)}{D_1(x)}$$
Now, these are new polynomials, but they're still polynomials, and instead of being polynomial of trig functions (like $\sin^8x\cos 5 x+3\cos x-6\sin^2 x$ or some ugly stuff), it's just a polynomial in terms of $x$. Combined, $f$ is a rational function in terms of $x$, which is great for integration, because of the partial fraction decomposition. This says that if:
$$f(x) = \frac{N(x)}{D(x)}$$ is a rational function, then we can factor the denominator into just its roots (so $(x-r)$ for a root $r$), and irreducible quadratics (so $(x^2+ax+b)$ where it has no zeros in $\mathbb R$). There's some technical details involving repeated roots, but essentially we can write:
$$f(x) = \frac{A_1}{x-r_1}+\dots +\frac{A_n}{x-r_n}+\frac{B_1 x+C_1}{(x^2+d_1x+e_1)}+\dots +\frac{B_kx+C_k}{(x^2+d_kx+e_k)}$$
This is just saying we can "break up the denominator" completely. This is great, because we can now integrate termwise, using either completing the square and $\arctan$ (for the irreducible quadratics), or just $\ln$ (for the roots).
So, the Weierstrauss substution converts integrals of rational functions of $\sin,\cos$ into just integrals of rational functions, and we can do integrals of rational functions REALLY well.