$\newcommand{\var}{\mathrm{Var}}$In my textbook I am studying about heteroskedasticity in a linear regression model, and for doing the hypothesis test, it says our hypothesis is: $H_0: \var(u|x_1,x_2,...,x_k)=\sigma ^2$, however than it says:
Because we are assuming that $u$ has a zero conditional expectation, $\var(u|\mathbf{x})=E(u^2|\mathbf{x})$ (where $\mathbf{x}$ is all the regressors $x_1,x_2,x_3,...,x_n$), and so the null hypothessis of homoskedasticity is equivalent to: $$H_0: E(u^2|x_1,x_2,...,x_k)=E(u^2)=\sigma^2$$
Why is this true? I dont understand why we use $u^2$ and then regress the independent variables on it.