In a rock song, you want powerful and up-front electric guitar - that's what rock is all about, right? Unfortunately electric guitars and voices usually occupy the same spot on the frequency spectrum around 3 KHz. So the guitar often overpowers the vocal. Well, when we're mixing, if we want to turn one thing down in relation to another (that's what mixing is all about, right?), we can just move a slider on, say, the guitar track until it's low enough that the vocal can be heard clearly. The only problem is that by the time you get a clear vocal all the way through the song, you've turned the guitar down too much for it to be punchy and powerful.
Of course you can use EQ to reduce the guitar's frequency at around 3 KHz, which will help. But what if that isn't enough? It often isn't. Well that is where "ducking" comes in (which can be used for any and all instruments - not just guitar of course). See my article on ducking here: What is Ducking In Audio Recording?, where I show you how to do ducking in Reaper recording software. This technique uses a compressor to automatically push down the level of the guitar (or any instrument track), but ONLY when the singer is singing. You could do this manually if you are very, very patient. I highlighted an article earlier this week showing you in a video how to do this in Making The Vocal Track Sit Well In The Mix .
Here is an article by Bjorgvin Benediktsson, complete with audio examples, that talks about "side-chain" compression (the way you make ducking happen) to get the guitar out of the way of the vocal in a rock mix: