Errors vs Residuasl in linear regression

#1
Hello,

As far as i know in regression analysis the errors have all the same constant variance. On the other hand the residuals of the sameple that we run the model do not all have the same variance: the variance increases as the corresponding x-value gets farther from the average x-value. When we test regression assumption of homoskedasticity we plot the residuals to verify that theoier variance is constant. But from what i said before the residuals do not have the same variance. If this is valid how can we test the homoskedasticity assumption of the errors by plotting the residuals>?

Thanks,

ANdreas