Example 2 The remainder of the polynomial $x^{12}-x^{6}+1$ divided by $x^{2}-1$ is $\qquad$
(A) 1
(B) -1
(C) $x-1$
(D) $x+1$
(1993, National Junior High School Mathematics Competition)
Solution: Let the quotient be $g(x)$. Since the divisor is a quadratic polynomial, the remainder is at most a linear polynomial, so we can set
$$
x^{12}-x^{6}+1=\left(x^{2}-1\right) g(x)+a x+b \text {. }
$$

Taking $x=1$, we get $1=a+b$;
Taking $x=-1$, we get $1=-a+b$.
Solving these, we get $a=0, b=1$.
Therefore, the remainder is 1. Hence, the answer is (A).