Conceptual issues in linear modeling Mathematically an AR model is expressed as:
$$ X_t = -\sum_{i=1}^p a_i X_{t-i} + \eta_t$$
Resources say that $\eta_t$ is a white gaussian noise. Is this $\eta_t$ the residual error? When invoking Matlab commands like ar() or arburg() or aryule() do we take into account this term? What is the difference between the $\eta_t$ and the residuals?
 A: I am not sure I understand all of your questions so I am going to wait for an edit.
However I get the impression you have some troubles differentiating between residuals and error terms.
This relates to your last question, which I want to answer here. 
The $\eta_t$, usually termed as $\epsilon_t$ is called the error term of the model. This is not equal to the residual. It goes as follows:
We assume that the data we observe is produced by two things: The influence of the regressor (in this case the AR terms of $x_{t-p}$) and a random component.
This random component is the error term. It can be viewed as inaccuracies of measurements or as other, randomized influences our model does not take into account. In any case if our model of the deterministic influences (here our ARs) is correct and sufficient, it is reasonable to assume that everything else is normally distributed error around the mean of zero - hence $\eta \approx N(0,\sigma^2)$ and the realizations (which we can not observe) are the $\eta_t$ taken from this distribution. Throughout this it is assumed (and this is actually important for this regression technique to work) that $\eta_t$ is uncorrelated with each $x_{t-p}$ in the left hand side of the model. If $\eta_t$ is truly random - this is the case!
However this $\eta_t$ are not the residuals! Since we only have data of the $x_t$, the $\eta_t$ (which are a part of the $x_t$) stay hidden to us. The residuals on the other hand we can calculate.
As soon as we have estimated our parameters, in your model the $a_p$ - and the estimates get a little hat to show that they might not be exactly the true value - $\hat{a_p}$, then we can use those to calculate our estimated $x_t$, called $\hat{x_t} = \sum_{p=1}^n \hat{a_p} x_{t-p}$.
What is missing here? Well the error term $\eta$ of course!
So now we have two sets of data: Our estimated $\hat{x_t}$ using our estimated values for $\hat{a_p}$ and our real, observed values for $x_t$.
The difference are the residuals: $\hat{\eta_t}=x_t-\hat{x_t}$
If everything goes as planned, you can understand the residuals as "estimates of our error terms". Because if we turn the equation around we get
$\hat{\eta_t}=x_t-\hat{x_t} => x_t = \hat{x_t}+\hat{\eta_t} = \sum_{p=1}^n \hat{a_p} x_{t-p}+\hat{\eta_t}$
But since we already estimate everything else in the equation and our data is given, our residuals are necessarily the difference between those values - the left over - the residual...
You can understand the residual either as deviation from our forecast of from the real data, or our estimate of the error term.
First thing to notice - if there was no random influence - no $\eta_t$ AND our estimation was 100% correct, then $x_t=\hat{x_t}$ and our residuals were zero for each t! But we do know and assume there is this random influence $\eta_t$. 
So now think about this: When are our residuals, $\hat{\eta_t}$ equal to the real, unobserved and random error terms $\eta_t$? Well ONLY if our estimates are exactly equal to the true (unobserved) values, so $\hat{a_p}=a_p$ for all p!
Turning this around: If our residuals appear to be normally distributed (you can and always should plot the residuals), AND our model is structurally correct, it is a pretty good bet that we have done a good job estimating our parameters $\hat{a_p}$, because our residuals - the left overs from our estimation - seem to only show the $\eta_t$ (we don't know exactly because we can never observe the true error term, but if it looks random it probably is the error term).
Anyway this should give you a proper understanding on what the error term is. 
The way it is taken into account in regression is as above - it isn't! It is randomly centered around zero (or if it is not, then we introduce a constant to the model to make it so!) and the goal is to get all influences BUT the random error into our estimated model!
(it helps to keep in mind the objective of the regression - we want to know the true values for the regression parameters, ie what makes the dependent variable move. We do not want to include random error)
