We're a bit confused on what it means to "rotate around the axis". How does that work exactly? I heard the the idea that in the C/G axis you're rotating around E/E♭, but what does that mean...to "rotate around the axis"?
By “axis,” we mean that there is a fulcrum point around which pitches are rotated (or "inverted"). In other words, a pitch that is a distance of x above the axis will invert around that axis and appear a distance of x below the axis.
Let’s say we have an axis of C, and we want to invert D around that axis. Since D is a major second (whole step, or two semitones) above C, its inversion will be B♭, because B♭ is a whole step below C.
Sometimes the axis is not a single pitch, but rather the space between two pitches. Let’s say we have an axis located between the pitches E♭ and E, and we want to find how G inverts around that axis. This can be trickier, because we aren’t used to thinking that “G is a minor third and one quarter step above the axis between the pitches E♭ and E.” Instead, we’ll find the interval above the upper pitch and move down that interval from the lower pitch. In other words, since G is a minor third above E (the upper pitch of the axis), it inverts to C, which is a minor third below E♭ (the lower pitch of the axis).
As another example of that type of problem, let’s invert A# around the E/F axis. Since A♯ is an enharmonic perfect fourth above F (the higher pitch of the axis), it inverts around the E/F axis to B, which is a perfect fourth below the lower pitch of the axis.
When we rotate around a C/G axis, it ultimately means we're rotating around the midpoint of C/G, which is the spot between E♭/E. (There are other ways to think of this, but this will be the simplest.)
But there's an even easier way to do it!
Let's make a circle with all of the pitches, and let's draw a straight line through the pitch axis. (In doing so, you'll also have a straight line through the pitch a tritone away.) The below picture shows an axis of D♭ (which is the same axis as G, since it's a tritone [six half steps] away, and the octave is twelve half steps).
And we see that D inverts around D♭ to C, E♭ inverts to B, D♭ inverts to itself, G inverts to itself, etc.
If the axis is between two pitches, the diagram will look something like this:
And here we see that E♭ inverts around the C/D♭ axis to B♭, etc.
Note that the decision of which axis to use is up to the composer; there's no reason the axis must be between E♭/E. It could be between any other pair of pitches (or a single pitch), but of course the resulting inverted pitches would be different.
Richard explained the whole thing pretty well in his answer, but there are a few things I'd like to add.
A scale has stable and unstable notes. In a C major scale, the stable notes are C, E and G. The rest of them - D, F, A and B - are unstable. For reasons, it's desirable to choose an axis that makes every note keep it's stability property. And there's only one axis that satisfies this, which is shown here:
This transforms the C major scale to C minor.
I got this information from this video: