Determine the leading term, the leading coefficient, and the degree of the polynomial. Then describe the end behavior of the function's graph and classify the polynomial function as constant, linear, quadratic, cubic, or quartic.
$$g(x)=x^{4}-2 x^{3}+x^{2}-x+2$$