It is not easy to answer your question in a few lines. The following points may help you:
The analysis of covariance is a variant of ANOVA. Analysis of covariance allows the researcher to control or adjust for variables that correlate with the dependent variable before comparing the means on the dependent variable. These variables are known as covariates of the dependent variable.
To the extent that the levels of the covariates are different for the different research conditions, unless you adjust your dependent variable for the covariates you will confuse the effects of your independent variables with the influence of the pre-existing differences between the conditions caused by different levels of the covariates.
By controlling for the covariates, essentially you are taking their effect away from your scores on the dependent variable. Thus having adjusted for the covariates, the remaining variation between conditions cannot be due to the covariates.
One common use of ANCOVA is in pre-test/post-test designs. Assume that the pre-test suggests that the different conditions of the experiment have different means prior to testing (e.g. the experimental and control groups are different), ANCOVA may be used to adjust for these pre-test differences.
For more details and examples see, the reference: Dennis Howitt and Duncan Cramer (2008). Introduction to SPSS, and Landau and Everitt (2004). A handbook of Statistical Analyses using SPSS.
A covariance is the degree of association between 2 variables. When it is divided by the standard deviation of both contributing variables it becomes the correlation, which ranges from -1 through 0 to +1.
In the context of the general linear model it can refer to the degree of association of a regression variable with another explanatory variable.
In the context of repeated measures general linear model it can refer to the degree of association between a fixed and random effect in the model. Whether to include the covariance in this sense (as an interaction term) has several answers.
In the context of mixed models (such as repeated measures) the question of which covariance structure to choose arises.
As you can see, you need to state your question more explicitly.
Note that the glm command in R is for the generalized linear model, the lm command is for the general linear model. So you need to be explicit about about the package and the command you are using.