Zero minutes of prep: There's a few modules from Basic/1e that I know so well that I don't even need to open the book to run. Or to riff off of...
1+ minutes of prep: Beyond that? There's more than enough random D&D ideas floating around in my head to string something together in the space of time it takes to create a character.
More importantly the player(s) will often supply me with everything I really need. All I have to do is listen to them, ask a few questions in response & add in a monster or two.
The last game I ran off the cuff like this resulted in a very Gamma World style adventure:
It was run spur of the moment at the shop to teach several complete new players the basics of D&D. It used the 6 stats rolled in order on 3d6, fighters/thieves/wizards/clerics, Humans/Elves/Dwarves/halflings & THAC0:20, everyone was 1st lv - essentially 1980 BASIC - but without even the rulebook as the session was 100% unplanned.
Casting spells - just tell me what you want to have happen. Roll under your INT. The more you succeed by, the closer to the desired effect you'll come. Roll over & the spell fails. Roll a 20 & the spell goes wrong.
* = details provided by the player(s)/spectators
^ = details provided by me
Dan, a neo-Russian soldier (fighter)* {armed with a rifle (type never determined), only 10 rounds of ammo, a dagger, a halberd, a breast plate & backpack full of gear (most never determined except rations/torches & a crowbar)}* was on a quest to find (and loot?) The Tomb of Obama*.
Late in the afternoon he entered the ruined city* of Mazlon*. An int check revealed that he'd heard that the people who'd once lived here had worshipped TIGERS!* And that to this day the beasts still prowled the area^....
So Dan set about searching some of the ruined buildings for supplies, a safe resting place, etc*. All the while keeping a an eye out for tigers.*
Moving down what seemed to have been the main street, Dan passes a perception check & hears a scream from up ahead.... Going to investigate, using rusting out cars* as cover, he sees a pack of trident wielding Tazloi^ dragging someone into a ruined store front^. This won't end well for the victim.... So Dan sneaks in after them, ambushes those he finds still upstairs & uses up 1/2 his ammo mowing down the rest in the basement as they were preparing to eat the Elf wizard* they'd caught.
Now there's two players!
They flee before more tazloi show up.*
In their haste to get out of there they aren't particularly careful & thus fail a perception check several blocks away - and are pounced upon by a giant orange furred cat. The locals were right, there are still tigers in this area!
Fighting for their lives vs the tiger in the middle of the street is a very noisy flashy affair & a sword wielding dwarf - with 3 arms - runs out of an ally-way to help them* (another player has entered the game)
Finishing the tiger uses up the time remaining. So the dwarf leads them back to his basement bunker* to hide/rest.
Neo-Russian soldiers? 3 armed dwarves? Fighting tigers in the middle of the street amongst ruined cars? While searching for Obamas tomb? WTH?? Eh, I don't know. That's what the players came up with. Me? I just added simple rules, some connective tissue & a few Tazloi.... Everyone had about 90 minutes of fun & 3 new (RPG)gamers were made.