Cycling largely uses the muscles on the front of your legs while running uses only the ones on your back. With training the body can also differentiate between so-called ‘running fibres’ and ‘cycling fibres’ within the same muscle and recruit one for the other, which is what triathlon brick training is all about. You can then use the entire muscle for a single activity rather than just a portion of it.
In more advanced athletes, scientists have discovered that they can use either the left of right side of a muscle for specific activities according, it seems, to their dominant brain side, but trained elite athletes can actually use the complete muscle for both activities if they choose to do so.
So strictly speaking the body is using the same muscles, but different fibres and even specific cells for the different activities. Think of it as being like a plate with beans and peas on it. One activity eats beans the other, peas, but clearly if you can train the body to eat both beans and peas with the same spoon, then the nutritional benefits make for superior performance.
Oh, a quick disclaimer, I am by no means an expert sports scientist, this is just stuff I have gleaned from working with top athletes in various fields, some of the details may be slightly wrong, but the gist of it is correct in broad terms I think.