Your question is too minimal to answer anything. GLM and ANOVA are done in a multitude of scenarios. You need to be very specific in your question. In fact just if you type GLM and R/ ANOVA and R you will get thousands of tutorials in google starting from very basic ones to advanced level. I really didn't get the sense of your question.
I agree with Veera, your question is too vague. My first answer was based on your Topics and considering that you are new in R. I think that Salvatore did a useful consideration about the GLM meaning in your question; although, if you specify more your question you will get better answers.
I also agree with the previous answers. The question needs to be more specific.
For instance which kind of ANOVA are you doing? How is the distribution of your response variables? ...and so on.
For an ANOVA there are many ways of coding it with the simplest being use of lm or aov and TurkeyHSD in stats package e.g.
aov / lm (response~Predictor1*Predictor2*............, data=your-dataset, na.action=na.exclude). You can include more arguments to be specific.
The GLM may use the same format but the best way is to use the question mark command in R-studio as below. All instructions and details regarding use of that function will be provided.