One of the best descriptions of mind-wandering, by Oliver Wendell Holmes:

Many times, when I have got upon the cars, expecting to be magnetized into an hour or two of blissful reverie, my thoughts shaken up by the vibrations into all sorts of new and pleasing patterns, arranging themselves in curves and nodal points, like the grains of sand in Chladni’s famous experiment,—fresh ideas coming up to the surface, as the kernels do when a measure of corn is jolted in a farmer’s wagon,—all this without volition, the mechanical impulse alone keeping the thoughts in motion, as the mere act of carrying certain watches in the pocket keeps them wound up,—many times, I say, just as my brain was beginning to creep and hum with this delicious locomotive intoxication, some dear detestable friend, cordial, intelligent, social, radiant, has come up and sat down by me and opened a conversation which has broken my day-dream, unharnessed the flying horses that were whirling along my fancies and hitched on the old weary omnibus-team of every-day associations, fatigued my hearing and attention, exhausted my voice, and milked the breasts of my thought dry during the hour when they should have been filling themselves full of fresh juices.