Maria plants the forged letter. Sir Toby, Sir Andrew, and Fabian hide to watch. Malvolio finds it, is completely taken in, and fantasises about becoming Count Malvolio.
Maria plants the forged letter on the garden path and hides. Sir Toby, Sir Andrew, and Fabian conceal themselves in a box hedge to watch. Malvolio enters, alone, and immediately begins to fantasise aloud. He imagines himself as Count Malvolio: dressed in a velvet gown, giving orders to servants, leaving Olivia's bed to walk through the house with an air of authority, dismissing Sir Toby with a look.
He finds the letter. He reads it and is immediately certain it is for him: the handwriting resembles Olivia's, the writer describes loving someone whose name begins with M, and the qualities the letter attributes to its recipient match Malvolio's own self-description exactly. The letter contains instructions: be proud, be distant from the common people, cross-garter the yellow stockings, smile constantly, refuse to explain yourself.
Malvolio believes every word. He vows to follow the instructions exactly. He thanks his stars and leaves to prepare himself. Sir Toby and the others are barely able to contain themselves.
The scene is the play's greatest comic set-piece, and its comedy works on two separate mechanisms. The first is Malvolio's fantasy before he even finds the letter. His dream of becoming Count Malvolio is revealing precisely because it is less about love for Olivia than about social power: he imagines the velvet gown, the air of authority, dismissing Sir Toby, summoning officers. Olivia herself barely appears in the fantasy. What Malvolio desires is rank, not romance.
This is exactly why the letter works. Maria did not need to appeal to Malvolio's love; she appealed to his ambition. The letter's most famous line, "Some are born great, some achieve greatness, and some have greatness thrust upon 'em," speaks directly to his deepest wish: that greatness is coming to him because he deserves it. He has only to receive it. The instruction is perfectly calibrated to his character.
The second comic mechanism is the watching audience. Sir Toby, Sir Andrew, and Fabian observe in real time, providing a running commentary of barely suppressed laughter. Shakespeare gives the scene a theatrical double layer: the audience in the theatre watches Malvolio; the characters in the hedge watch Malvolio; and the characters in the hedge react to what they see, which gives the actual audience permission to laugh at the reactions as well as the event itself. The box-hedge watchers are comic amplifiers.
The letter scheme raises a question that will not be fully answered until Act 5: how far is too far? At this point the prank feels like justice, or at least like appropriate punishment for genuine pomposity. Malvolio walked into the garden fantasising about rank; the letter simply confirms what he already believed. But the fact that his pride made him vulnerable does not make the vulnerability a fair target.
"Some are born great, some achieve greatness, and some have greatness thrust upon 'em" is one of Shakespeare's most quoted lines. Its context matters: it is bait in a trap, placed inside a forged document to flatter a vain man into humiliating himself. Understanding the context transforms the line from a motivational statement into a study in the power of telling people what they want to hear.