The poem starts with the speaker urging a friend (which may just refer to the reader in general) to get up and leave their books behind. Otherwise, the speaker says, "you'll grow double"—which might be a reference to the physical weight of lugging books around, or to the idea that this friend will gain weight if they do nothing but sit around and read.
The speaker next tells this friend, "clear your looks." Apparently, studying has caused the friend to scowl or frown, and the speaker wants to remove the look of intense concentration.
The quick repetition (technically epizeuxis) of "up" adds urgency and intensity to the speaker's call to action, as does the anaphora and broader parallelism of lines 1 and 3:
Up! up! my Friend, and quit your books;
[...]
Up! up! my Friend, and clear your looks;
These lines are almost exactly the same, and this suggests a connection between putting down the books and clearing the pained/strained look from one's face. In other words, taking a break from studying offers a sense of relief. There's no need for all the "toil and trouble" of intellectual study, the speaker implies, with the alliteration and consonance of this phrase drawing a connection between the "toil," or work, of studying, and pain/suffering/etc/ ("trouble").
This stanza is filled with such sonic devices, in fact. The repeated /b/, /l/, and /k/ sounds add a deliberate bit of clunkiness to the language, which in turn suggests the tedium of traditional studying:
Up! up! my Friend, and quit your books;
Or surely you'll grow double:
Up! up! my Friend, and clear your looks;
Why all this toil and trouble?
This stanza also establishes the poem's use of ballad meter. This means it's lines alternate between iambic tetrameter (lines with four iambs, poetic feet with an unstressed-stressed beat pattern) and iambic trimeter (lines with just three iambs). The meter is pretty inconsistent here, however:
Up! up! | my Friend, | and quit | your books;
Or sure- | ly you'll | grow double:
Note how the poem starts with a spondee (two stressed beats in a row, as in "Up! up!"), which simply makes the speaker's command all the more energetic and forceful. The dangling unstressed beat at the ends of lines 2 and 4 ("trouble" and "double") adds to the stanza's aforementioned clunkiness, making things feel a bit jumbled and disjointed (perhaps evoking the dizziness that comes from staring intensely at a book for too long!).
The poem also follows a ballad rhyme scheme, meaning it follows the pattern ABAB; "books" rhymes with "looks" and "double" rhymes with "trouble."
Finally, the speaker might be making a subtle allusion to Shakespeare's play Macbeth here, which famously includes the line, "Double, double toil and trouble." This is part of a chant by a trio of witches spelling out danger for the play's main character—and the allusion might suggest that academic study is similarly a recipe for pain and agony!