In a book it is written that,
In regression work we typically assume that the observational errors are pairwise uncorrelated. But in most time series data , the successive residuals have tendency to correlated with themselves.If we find autocorrelated errors, we need to modify the regression procedure to remove the effect of autocorrelated errors. Typically this is done by an appropriate transformation of the variables used in the regression estimation procedure.
Consider a multiple regression model with autocorrelated errors $$Y_t=\beta_0+\beta_1X_{1t}+\beta_2X_{2t}\ldots+\beta_pX_{pt}+\epsilon_t\ldots(1)$$
and the same regression model at time ${t-1}$ is $$Y_{t-1}=\beta_0+\beta_1X_{1,{t-1}}+\beta_2X_{2,{t-1}}\ldots+\beta_pX_{p,{t-1}}+\epsilon_{t-1}\ldots(2)$$
Multiplying both sides of this equation by correlation coefficient $\rho$,the correlation between adjacent errors gives $$\rho Y_{t-1}=\rho \beta_0+\rho \beta_1X_{1,{t-1}}+\rho \beta_2X_{2,{t-1}}\ldots+\rho \beta_pX_{p,{t-1}}+\rho \epsilon_{t-1}$$
Then we subtract this equation from the first equation to obtain $Y_t-\rho Y_{t-1}=\beta_0(1-\rho)+\beta_1(X_{1t}-\rho X_{1,{t-1}})+\beta_2(X_{2t}-\rho X_{2,{t-1}})\ldots+\beta_p(X_{pt}-\rho X_{p,{t-1}})+u_t\ldots(3)$
where $u_t=\epsilon_t-\rho \epsilon_{t-1}$ has uniform variance and is not autocorrelated.