WARNING: This got a bit out of control. Please don't be intimidated by the diagrams and the wall of text. Also please note that in the following (and in the music, generally) the word "modulation" means just a change of key.
Obviously, these modulations are the most common ones. However, you can modulate from any key to any other key without much hassle. The only thing you need to do is to find a path between the two keys. (There are many, many possible paths between any two keys, so it's your choice. It can be shorter or longer, whatever you like.)
The book talks about the modulations in the terms of the circle of fifths, which is, in my opinion, a great approach, so I'll stick to it in this post.
As your book correctly notes, the safest modulation is to the neighboring keys or to the relative minor/major keys. So for now, the possible paths look like this (see the left circle):
I drew the paths only for one key (C major), but it works just the same way for all 11 other keys. (The drawing would also get messy very fast.)
Another, very common and useful way of modulating, is using the dominant seventh chord in the minor keys (for instance, Ami - E7). This makes it possible to modulate up by 4 sharps very fast. I drew the paths that use this in blue on the right image.
However, we can extend this logic as far as we want. Basically: whenever we find two chords that sound well one after another, we can use them to modulate. The only thing we need to do is to "hammer it home" after modulating, so there is no doubt that we really are in the new key.
So say that we would like to modulate from C major to E major. One possible path would be going through A minor. So we play chords: C -- Ami -- E. But with this, the modulation is not yet done (in fact, if we stopped with E, it would look like we ended in A minor and that E was used to "hammer the A minor key home"). We need to play something that will firmly root us in E major, and that needs to be some chord that 1) pulls strongly to the E major chord, and 2) is not contained in A minor, so that it's really clear we're not in A minor anymore. A good choice would be B7 (with its D# and F#, it makes it very clear it does not belong in A minor). So we would play something like: C -- Ami -- E -- B7 -- and now we are in E major, so we can continue with anything from that key, for instance F#mi -- G#mi -- A -- B -- E. We're just firmly there.
But this mechanism can be used for any transition. So let's say we found out that playing Ab major after a C major sounds good. We can immediately use it to modulate: C -- Ab -- Eb7 -- Ab and we're there. We can also target other chords than the tonic: so if I wanted to go from Bb major to G major, I can do Bb -- Eb -- D (here we ended up at the dominant of the target G major) -- G. (Or Bb -- Gmi -- D7 -- G. Or anything.) If you can play the guitar (or any other instrument capable of harmonies), I think you should try these simple progressions out.
And now, there are lots of chord pairs that sound good. We can, for instance, use the idea of secondary dominants: we can prepend any chord from our key by its own dominant chord and it will just sound good. So we can "embellish" the progression C -- G to C -- D -- G (D major is a dominant to G, and it works out in spite of the fact that it does not belong into C major.) Or we can play: Emi -- F#7 -- B7 instead of just Emi -- B7.
So let's draw that into our diagram (with magenta arrows, see the left circle below). And while we are at it, we can also use modal progressions (for instance a minor to D major, making it sound like the Dorian mode, or C major to Bb major, which sounds like the Mixolydian mode, etc. -- green arrows). Or we can use the simple modulation to the minor/major key of the same name (using the dominant chord, for instance C -- G7 -- Cmi; goldish arrows). Or we can use any trick we can think of (some of my favorite are shown in orange arrows -- also note that sometimes you can make up two or more reasons for drawing a single arrow between two keys!).
The diagram is pretty confusing by now, but it illustrates my point: you can easily go from anywhere to anywhere just in a couple of steps. And all of them can be made pretty smoothly, so don't think that half of those arrows corresponds to some cringeworthy modulations that are maybe possible in theory but ugly in practice. It's exactly the other way around: there are many more possible ways to make beautiful modulations, but drawing the arrows wouldn't really serve more purpose :--). And mind you, the same set of arrows is going from each of the other 11 minor and major keys.
And these are only the possibilities of modulating "by harmony". You can also modulate with melody only. It's also possible to use a modulating sequence (a simple lick that sounds well if followed with its own transposed copy), or a device that I would call "chromatic mess", essentially starting to use weird chords that do not evoke any particular key (like the diminished 7ths, or maybe some quartal/quintal harmonies), chaining them chromatically, and emerging in a totally different key. Really, the sky is the limit here!