"Walk This Way" is often credited as original prototype for the rap-rock genre. While Run-DMC and other rappers had experimented with rapping over rock guitars before, this was the first time that rock and rap vocalists appeared on the same track together.
The first thing you'll notice is the beat, which is exactly the same as the original rock version. With an open hi hat on the first beat, a snare on the second, and triplet bass drum hits inside the third sending you to the snare on the four, this beat is great on its own. So Run-DMC kept it unchanged, but they stuck it in a drum machine to get more of a hip-hop feel.
Beat boxes and other new technology were crucial to the history of rap, and even other 1980s genres, like new wave. As disco and dance music became popular in the 1970s, artists strayed away from live instruments and moved toward synthesizers in search of things like "the perfect beat." Some early drum machines didn't even bother making a bass drum hit sound like the real thing, because people at the time actually thought the fake sound was more interesting.
Running concurrently with the evolution of disco was the emergence of hip-hop culture. As you might have guessed from the name alone, hip-hop started with dance parties. DJs like DJ Kool Herc and Afrika Bambaataa hit upon gold when they realized that they didn't have to play full records at parties. The instrumental breakdowns and the hooks of songs were what people really loved to dance to. Thus "sampling" came to be. When rappers discovered the beat box, they combined it with sampling. Jam Master Jay's use of a drum machine to make an exact electronic copy of Aerosmith's rock beat is emblematic of hip-hop culture.
The opening beat of Run-DMC's "Walk This Way" transitions quickly into Jam Master Jay scratching a sample of the Aerosmith riff into the song. The "sample" isn't actually a sample, though. Originally DMC and Run wanted to rap over a sample of the original record, but producers Russell Simmons and Rick Rubin flew in Aerosmith's lead singer Steven Tyler and lead guitarist Joe Perry to help play a flat-out cover of the song.
Joe Perry came up with the "Walk This Way" riff in March 1975, while he was hanging out in Hawaii. The riff is in the E blues scale. It climbs up chromatically from A to B-flat to B to the middle E and then loops back, landing on the low E. That B-flat is an extra note called the "blue note" in a common rock scale, the pentatonic, and the idea is that it sounds just weird enough to give the scale a kick in the pants without sounding totally off. The blues scale is, of course, most commonly used in the blues, but blues-derived music like jazz, funk, and rock and roll employ it as well.
Aerosmith cites bands like The Meters and The Yardbirds as influences on the riff. Tyler noted specifically the influence of The Yardbirds, the pre-Led Zeppelin Jimmy Page rock group. He explains, "The Yardbirds' music is a gold mine waiting to be stumbled upon. Aerosmith did, because we grew up in that era. The riff in 'Walk This Way' is just us trying to explore the blues in the Yardbirds model." While Aerosmith is known as America's answer to Led Zeppelin, some of the band's biggest hits are derived from the Brits, like their cover of The Yardbirds' "Train Kept a Rollin'." Joe Perry says the "Walk This Way" riff is Meters-derived, even though it's a guitar riff, not a horn riff: "I didn't have too many guitars back then. To really sound like a Meters hook, we knew we needed hornlike parts. We weren't going to bring up the horn subject, We're guitar players." You can get a real sense of how the riff grew from The Meters if you listen to the beginning of the song, "Look-La Py Py, Jungle Man."
With deep roots in both the rock and the rap traditions, the song's "rap-rock" status is derived from more than just Tyler's rock and roll swagger and Run-DMC's tag-team rapping. Run-DMC found ways to add elements of the hip-hop tradition while staying true to the original song.