When you hear a great song, you can think of where you were when you first heard it, the sounds, the smells. It takes the emotions of a moment and holds it for years to come. It transcends time. A great song has all the key elements — melody; emotion; a strong statement that becomes part of the lexicon; and great production. Think of “Bohemian Rhapsody,” by Queen. That song had everything — different melodies, opera, R&B, rock — and it explored all of those different genres in an authentic way, where it felt natural.

When I’m writing a song that I know is going to work, it’s a feeling of euphoria. It’s how a basketball player must feel when he starts hitting every shot, when you’re in that zone. As soon as you start, you get that magic feeling, an extra feeling. Songs like that come out in five minutes; if I work on them more than, say, 20 minutes, they’re probably not going to work.

Smokey Robinson and the Miracles, ‘Shop Around’

Robinson thought Barrett Strong should record "Shop Around," but Gordy persuaded Smokey that he was the right man for the song. After it came out, Gordy heard it on the radio and found it way too slow. He woke Robinson at 3 a.m. and called him back to the studio to re-cut it — faster and with Robinson's vocal more prominent. That one worked.

Weezer, ‘Buddy Holly’

In the early 1990s, Cuomo had an awkward girlfriend who was routinely picked on. His efforts to stick up for her inspired Weezer's breakthrough, a track whose bubble-grunge hooks and lines such as "I look just like Buddy Holly/And you're Mary Tyler Moore" helped the band reach a nation of pop-minded suburban punks. It also earned Weezer autographed photos from the real Mary Tyler Moore.

The Rolling Stones, ‘Miss You’

The Stones were in Toronto, rehearsing for their classic gigs at the El Mocambo Club, when Jagger, jamming with R&B legend Billy Preston, came up with "Miss You." With a disco groove and a touch of the blues via a harmonica player they found in a Paris subway, it became the band's first Number One hit in five years. "It's not really about a girl," Jagger said. "The feeling of longing is what the song is."

Bruce Springsteen, ‘The Rising’

Springsteen wrote the track about 9/11, taking the viewpoint of a firefighter entering one of the Twin Towers ("Can't see nothin' in front of me …") before unleashing the gospel-tinged chorus. It was the title track from an album intended to help his fans cope with the tragedy. "The fundamental thing I hear from fans is, 'Man, you got me through' — whatever it is," he told Rolling Stone in 2002.

Jackson Browne, ‘Running on Empty’

The Running on Empty album was Browne's grand experiment: a set of all-new songs recorded onstage, in hotel rooms and on the tour bus. The title track was actually written while Browne was driving to the studio each day to make The Pretender. "I was always driving around with no gas in the car," he said. "I just never bothered to fill up the tank because — how far was it anyway? Just a few blocks."

The Rolling Stones, ‘Brown Sugar’

The Stones take on slavery, sadomasochism, interracial sex — and make it catchy as hell. At Muscle Shoals studios, Jagger scrawled three verses on a pad, and Richards supplied an impossibly raunchy riff. Add some exultant punctuations and you have a Stones concert staple.

R. Kelly, ‘Ignition (Remix)’

R. Kelly's automotive metaphors for booty-knockin' in "Ignition" are subtler than they might've been; the lyrics were toned down at the request of a Chicago radio station. On Chocolate Factory, the original version of the song segued immediately into the hit remix.

MGMT, ‘Time to Pretend’

The rhythm was inspired by the wriggling of a praying mantis that VanWyngarden and Goldwasser kept in college. VanWyngarden wrote about rock-star fantasies ("I'll move to Paris, shoot some heroin"), though it's unclear how facetious the words are. "Some think we're druggies. Others see the tongue-in-cheek element," he said. "That's what I hope for as a lyricist: confusion!"

Gloria Gaynor, ‘I Will Survive’

In 1979, Gaynor's career was falling apart. Donna Summer had replaced her as the leading disco diva, and the 32-year-old Gaynor had recently suffered the death of her mother and had undergone spinal surgery. So when she belted out "I Will Survive," she brought extra attitude. The track was originally a B side, but after enterprising DJs started to play it at discos, it turned into a smash.

Joan Jett and the Blackhearts, ‘I Love Rock ‘N Roll’

Attempting to jump-start a solo career after her stint in the Runaways, Jett had her demo tape to "I Love Rock 'N Roll" rejected by 23 record labels. Tiny Boardwalk Records finally bit, but the label sold her the radio rights to the track for $2,500. Today, the song is worth nearly $20 million.

Coldplay, ‘Clocks’

Coldplay were scrambling to finish their second album and wanted to save "Clocks," with a churning piano riff inspired by the band Muse, for a later album. Luckily, a friend intervened. "He said, 'You're going on [in the lyrics] about urgency, and you're talking about keeping this song back,' " said Chris Martin. " 'That doesn't make sense.' "

The Drifters, ‘Under the Boardwalk’

A staple of beach-town jukeboxes every summer since its release, "Under the Boardwalk" evokes the carefree sounds of the shore. But its recording was no day at the beach. Johnny Moore was drafted to sing lead because the track's original singer, Rudy Lewis, died of a heroin overdose in his hotel room the night before the session.

The Cure, ‘Just Like Heaven’

"I've never been a big fan of irony," Smith said, which might be why this reverie of love, cut at a vineyard in the South of France, is his favorite Cure song. The band's girlfriends influenced the music. "The girls would sit on the sofa in the back of the control room and give the songs marks out of 10," he said. "So there was a really big female input."

Alice Cooper, ‘I’m Eighteen’

Before "I'm Eighteen," Cooper was just another hairy rock oddball. But this proto-punk smash defined the age when, in Cooper's words, you're "old enough to be drafted but not old enough to vote." A few years later, Johnny Rotten sang this at his audition for the Sex Pistols; by then, Cooper was a guest on The Muppet Show.

David Bowie, ‘Young Americans’

In 1975, Bowie traded his glammed-out Ziggy Stardust persona for an exploration of what he called "plastic soul." Yet this R&B homage is one of his warmest, wildest tales, recorded in Philadelphia with a then-unknown Luther Vandross on backing vocals and David Sanborn wailing on sax. "It's about a newlywed couple who don't know if they really like each other," Bowie said.

LaBelle, ‘Lady Marmalade’

This hit about a Big Easy streetwalker remains in rotation 35 years after it hit Number One. The group was from Philadelphia, but the nasty groove was classic New Orleans, with producer Toussaint and his house band, legendary R&B stalwarts the Meters, funking up the beat. Thanks to the ladies of LaBelle, every disco fan now knows at least one line of French: "Voulez-vous coucher avec moi?"

Justin Timberlake, ‘Cry Me a River’

This breakup aria marked the formation of the Timberlake–Timbaland team, a match made in pop heaven. The stunning video — in which Justin stalks an actress dressed to look like his ex Britney Spears — made clear the inspiration for "River." "It's a good-ass video," Timberlake told Rolling Stone. "I didn't want anyone to come off smelling like roses."

Jefferson Airplane, ‘White Rabbit’

"White Rabbit" was a trippy rock & roll bolero written by Airplane vocalist Slick. "Our parents read us stories like Peter Pan, Alice in Wonderland and The Wizard of Oz," Slick said. "They all have a place where children get drugs, and are able to fly or see an Emerald City or experience extraordinary animals and people… And our parents are suddenly saying, 'Why are you taking drugs?' Well, hello!"

Kelly Clarkson, ‘Since U Been Gone’

Pop gurus Max Martin and Lukasz "Dr. Luke" Gottwald wrote this indignant track with Pink in mind, but Clarkson's A&R rep snatched it up for the first-ever American Idol. The result was a career-making hit that gave teen pop a feisty new template. "I went to see Foo Fighters when I was off in Texas," Clarkson said, "and the first thing Dave Grohl said to me was, 'I love that song!' "

Rick James, ‘Super Freak’

James wasn't exactly modest about his ambitions. As he declared in 1981, "I wanna make Paul McCartney white-boy money!" He got it with the self-described "punk funk" of "Super Freak," from his breakthrough album, Street Songs. James enlisted the Temptations for background vocals. The song got a second life when MC Hammer jacked it for the 1990 megasmash "U Can't Touch This."

Beastie Boys, ‘Sabotage’

Adam "MCA" Yauch came up with the killer fuzz-bass riff at Manhattan's Tin Pan Alley studio, but it wasn't until a year later that the song was finished in L.A. With two weeks to go before Ill Communication was completed, Adam "Ad-Rock" Horovitz got all hot and bothered about paparazzi on the mike and came out of the song's breakdown with a scream for the ages.

Foreigner, ‘I Want to Know What Love Is’

This gospel-rock hymn featured Dreamgirls star Jennifer Holliday, one of the Thompson Twins and, most notably, the New Jersey Mass Choir. Said Jones, "I'll always remember them getting in a circle before we did it and everyone saying the Lord's Prayer." That probably didn't happen for "Hot Blooded" — but this soaring ballad became Foreigner's biggest hit.

The Strokes, ‘Last Nite’

Youthful angst on the Lower East Side: Lou Reed vocals and cool confusion, driven by the surging, garage-band sound that would go on to define early-2000s rock. The Strokes supposedly nicked the opening riff from Tom Petty's "American Girl." "I saw an interview with them where they admitted it," Petty told Rolling Stone. "I was like, 'OK, good for you.' It doesn't bother me."

The Smiths, ‘How Soon Is Now?’

Morrissey cribbed lyrics from George Eliot, but guitarist Marr cited another reference: Derek and the Dominos. "I wanted an intro that was almost as potent as 'Layla,'" he said. "When [it] plays in a club or a pub, everyone knows what it is."

Aretha Franklin, ‘Do Right Woman — Do Right Man’

Franklin disappeared after a 1967 session in Muscle Shoals, Alabama, leaving this simmering ballad unfinished. A few weeks later, she resurfaced in New York. The resulting vocal, said producer Wexler, was "perfection."

The Supremes, ‘Where Did Our Love Go’

After eight flop singles, the trio were known as the "No-Hit Supremes." The Marvelettes — Motown's top girl group at that point — passed on this song, and the Supremes didn't like their own recording. Until it hit Number One, that is. That foot-stomping beat is actually two boards banged together.

Van Morrison, ‘Into the Mystic’

"Into the Mystic" is one of Morrison's warmest ballads, an Otis Redding-style reverie with acoustic guitar and horns. The lyrics are truly mysterious: "People say, 'What does this mean?' " said Morrison. "A lot of times I have no idea what I mean. That's what I like about rock & roll — the concept. Like Little Richard — what does he mean? You can't take him apart; that's rock & roll to me."

Del Shannon, ‘Runaway’

As a kid, Shannon got his first guitar for $5. His truck-driver dad wasn't too happy about it. "'You get that goddamn guitar outta here' — that's the exact words my father used," Shannon recalled. "However, my ma said, 'It's OK, son. You can sing for me.'" He sang this hit with raw emotion; co-writer Crook played the solo on an early electronic keyboard called the Musitron.

Cheap Trick, ‘Surrender’

Cheap Trick provided the ultimate Seventies teen anthem in "Surrender," with a verse about a kid who catches his parents making out and gets stoned to his Kiss records. Guitarist- songwriter Nielsen's secret? "I [had] to go back and put myself in the head of a 14-year-old."

The Beatles, ‘Rain’

The B side of “Paperback Writer” was Lennon‘s response to people moaning about the wet British weather. It featured one of the earliest uses of backward tape, which Lennon said was the result of being stoned and spooling up the tape wrong. It also included virtuoso drumming from Ringo Starr. “I feel as though that was someone else playing,” Starr said. “I was possessed!”

The Staple Singers, ‘Respect Yourself’

Stax singer Ingram, frustrated with the state of the world, told house songwriter Rice that "black folk need to learn to respect themselves." Rice liked the comment so much that he built a funk groove around it, then gave the song to the Staples. "This is the song I've been waiting [for]," said producer Bell, who laid it down with the famous Muscle Shoals Rhythm Section.

Jay-Z Featuring UGK, ‘Big Pimpin”

For this thumping ode to conspicuous consumption, the king of New York rap hooked up with Houston rap dons UGK over a beat that sounds like it was cut in Cairo. Timbaland allegedly based the melody on a 1957 song by Egyptian Abdel Halim Hafez.

Missy Elliott, ‘Get Ur Freak On’

Elliott was convinced that Miss E needed one more track. So Timbaland cooked up a stuttering, tabla-laden beat based on bhangra, an Indian dance genre he heard while traveling, and plucked out the signature six-note riff on a tumbi, a one-stringed Punjabi guitar.

Muddy Waters, ‘Rollin’ Stone’

For Chess Records' first single, Waters turned Mississippi bluesman Robert Petway's "Catfish Blues" into a spare track he named "Rollin' Stone." "We wouldn't do it exactly like those older fellows," Waters said. "We put the beat with it, put a little drive to it." The Rolling Stones took their name from it, as did, in part, this magazine.

Sam and Dave, ‘Soul Man’

For the follow-up to "Hold On, I'm Comin'," writer-producers Hayes and Porter decided to tinker with their formula: Porter asked singer Sam Moore to give him "the Bobby Bland squall," guitarist Steve Cropper came up with the licks that set up the familiar blast of the Memphis Horns, and — voilà! — another soul classic was born. "We had no idea how good we were," Hayes said of the partnership.

Nirvana, ‘All Apologies’

Written in the L.A. apartment Cobain shared with Courtney Love, this haunting meditation on remorse was originally produced by punk malcontent Albini, but then R.E.M. producer Scott Litt was brought in to smooth it out — the original had a long stream of feedback on it. Cobain's shredded vocals maintain the punk edge in the hushed MTV Unplugged in New York rendition.

Ramones, ‘Sheena Is a Punk Rocker’

This was cut twice: first as a single that was rushed to radio and became one of the Ramones' few modest hits, then in a slightly souped-up version for the band's album Rocket to Russia. "I combined Sheena, Queen of the Jungle, with the primalness of punk rock," said Joey Ramone. "It was funny, because all the girls in New York seemed to change their names to Sheena after that."

George Harrison, ‘My Sweet Lord’

The first hit for an ex-Beatle, it features Harrison's teardrop slide licks and a melody virtually identical to the Chiffons' "He's So Fine." After a lawsuit, Harrison had to pay $587,000 to his former manager Allen Klein, who then owned the rights to "He's So Fine." "It made me so paranoid about writing," Harrison said. "I thought, 'I don't even want to touch the guitar, in case I'm touching somebody's note.'"

Guns N’ Roses, ‘Paradise City’

For nearly seven minutes, Axl Rose expounds on the joys of green grass, pretty girls and toxic chemicals. The song was written in the back of a van as the band drove home to L.A. after a gig in San Francisco, with all the members tossing in lines. In a typically tasteful G n' R move, the video has footage of the band's 1988 gig at Castle Donington in the U.K. — where two fans were crushed to death.

Sam Cooke, ‘Cupid’

Cooke's producers had asked him to write a song for a girl they had seen on a Perry Como TV show — but once they heard her sing, they kept "Cupid" for Cooke to do himself. It was Cooke's idea to drop in the sound of an arrow being fired "straight to my lover's heart."

Chubby Checker, ‘The Twist’

"The Twist" began as a B side for Ballard and the Midnighters in 1958. But in 1960, former chicken plucker Checker covered it at Dick Clark's suggestion. "Going crazy is what I was looking for — where the music is so good you lose control," Checker said. " 'The Twist' did that."

The Beatles, ‘Penny Lane’

After Lennon composed "Strawberry Fields Forever," McCartney wrote his own snappy memoir. Penny Lane was a Liverpool bus stop where Lennon and McCartney often met. "John came over and helped me with the third verse, as was often the case," McCartney said. "We were writing recently faded memories from eight or 10 years before."

The Velvet Underground, ‘Heroin’

This seven-minute, two-chord track spiked out its territory with lyrics about shooting up until you felt like Jesus' son. "It wasn't pro or con," Reed said. "It was about taking heroin from the point of view of someone taking it. I'm still not sure what was such a big deal. So there's a song called 'Heroin.' So what?" Drummer Moe Tucker disagreed: "I consider it our greatest triumph."

The Shangri-Las, ‘Leader of the Pack’

Morton found the inspiration for this song at a diner in Hicksville, New York. "Bikers, hot rodders, gum-smacking ladies," he said, "not careful at all about their language." He brought a bike into the studio for the motorcycle sounds.

Toots and the Maytals, ‘Pressure Drop’

Toots and the Maytals were already reggae stars — they coined the word on 1968's "Do the Reggay" — before "Pressure Drop." They were rumored to be Chris Blackwell's choice over Bob Marley and the Wailers when he wanted a group for his Island label.

Nirvana, ‘Come As You Are’

"It's just about people and what they're expected to act like," Cobain said. "The lines in the song are really contradictory. They're kind of a rebuttal to each other." The song is driven by a simple riff that Vig goosed with a flanged, subaquatic guitar effect. Cobain apparently lifted it from a 1985 song by U.K. art-metal band Killing Joke, whom Dave Grohl paid back 12 years later by drumming on their 2003 album.

Sonny and Cher, ‘I Got You Babe’

Late one night, while Sonny and Cher were living in their manager's house, Bono woke up Cher and asked her to listen to "I Got You Babe" and to sing the lyrics, which he had written on a piece of shirt cardboard. She thought it was OK but really wanted a song that modulated. So he changed the key at the bridge and woke Cher up again hours later to hear it; she was delighted.