In Rudin, we are given this corollary, 7.27 to the Stone Weierstrass Theorem:
where Thm 7.26 is the Stone Weierstrass Theorem:

Say instead I replaced $|x|$ in the corollary with a continuous function such that $g(0)=0$, how would the proof change. I honestly don't see any specific changes, although I really feel as though I'm missing something important. Also I'm also confused by Rudin's proof in the first place, by the last line in particular. What does he mean: the polynomials $P_n(x)=P_n^*(x)-P_n^*(0) (n=1,2,3..)$ have the desired properties? Any help would be much appreciated. Thank you.

You are correct, in that the same argument will hold for any $g$ continous such that $g(0)=0.$ The reason Rudin singles out this result, is because he uses it soon afterwards when proving the general Stone Weierstrass theorem (for subalgebras of $C(K)$).
Of course, using the Weierstrass approximation theorem to prove this special case is somewhat overkill. An alternative approach is to consider the Taylor series of $\sqrt{|x|^2+\varepsilon} - \sqrt{\varepsilon}$ and obtain polynomials by taking partial sums while varying $\varepsilon.$
Edit: To answer your second question, let $\varepsilon > 0.$ Then by the properties of $P_n^*,$ there is $N$ such that for all $n > N,$ we have,
$$ | |x| - P_n^*(x)| \leq \varepsilon/2, $$
for all $x \in [-a,a].$ In particular $|P_n^*(0)| < \varepsilon/2,$ so by the triangle inequality,
$$ | |x| - (P_n^*(x)-P_n^*(0))| \leq ||x| - P_n^*(x)| + |P_N^*(0)| < \varepsilon $$
as desired.