Q:

What are the predicted values returned by the predict() function in R when using original data as input?

After running a regression of the form reg <- lm(y ~ x1 + x2, data=example) on a dataset, I can get predicted values using 
predict(reg, example, interval="prediction", level=0.95)

I'm wondering what the predicted values actually refer to when I'm using the regression to predict the actual dataset. Shouldn't I obtain the original values?

A:

The model you are working with takes the form
$y_{i} = \mu + \beta_{1} x_{1i} + \beta_{2} x_{2i} + \epsilon_{i}$ $\hspace{0.75cm}$    (1)
where $\epsilon_{i}$ is an error term assumed to come from a zero-mean normal distribution.
You have fitted the model and you have obtained estimates: $\hat{\mu}$, $\hat{\beta}_{1}$, and $\hat{\beta}_{2}$.
Now, if you fix covariate values within their range, say $x^{\star}_{1i}$ and $x^{\star}_{2i}$, a predicted value for $y_{i}$ can be obtained by computing
$y^{\star}_{i} = \hat{\mu} + \hat{\beta}_{1} x^{\star}_{1i} + \hat{\beta}_{2} x^{\star}_{2i}$ $\hspace{0.75cm}$    (2)
If your model fits perfectly your data, then predicted values are actual values. But, in general, $y$ values cannot be exactly obtained as a simple linear combination of $x$ values ("All models are wrong, but some are useful"). In other terms, the variance of the error term in (1) is not zero in general. But, basically, model (1) is a good approximation if the residuals $y_{i} - y_{i}^{\star}$ (or a scaled version of these) are "small".
Edit 
In your comments, you asked what predict() actually does. Here is a simple illustrative example.
    #generate a simple illustrative data set
> x <- runif(10)
> y <- 5 + 2.7 * x + rnorm(10, mean=0, sd=sqrt(0.15))
> 
>   #fit the model and store the coefficients
> regLin <- lm(y~x)
> coef <- coef(regLin)
> 
>   #use the predict() function
> y_star2 <- predict(regLin)
>   #use equation (2)
> y_star1 <- coef[1] + coef[2] * x
>   #compare
> cbind(y, y_star1, y_star2) 
          y  y_star1  y_star2
1  7.100217 6.813616 6.813616
2  6.186333 5.785473 5.785473
3  7.141016 7.492979 7.492979
4  5.121265 5.282990 5.282990
5  4.681924 4.849776 4.849776
6  6.102339 6.106751 6.106751
7  7.223215 7.156512 7.156512
8  5.158546 5.253380 5.253380
9  7.160201 7.198074 7.198074
10 5.555289 5.490793 5.490793

