In my experimental introductory course about Particle-Physics we discussed the deep inelastic scattering of an electron with a proton, where the electron interacts with a parton within the proton by electromagnetic interaction (by "exchanging" a photon).
I am recently studying a process where the parton which is interacting is a photon, so I assumed the photon can't be "real" or on-shell, since inside the proton it is a virtual particle (which I understand as it being off-shell). So I thought that $Q^2 = -q^2 \neq 0$. Now my professor said that the photon is on-shell but the $Q^2$ is not vanishing, which to me is confusing since if the photon is on-shell the square of its four-momentum should vanish. Furthermore he said $Q^2$ is more of a scale variable.
Can someone elaborate on this?
To be more precise, since I might not understand the meaning of $Q^2$ yet, can somebody explain the meaning of this quantity? And why should that partonic photon be on-shell?