Let us first ask the question: how do you define a genre like 'rock music'? To some extent, everyone knows what rock music is - it's like the Rolling Stones or Led Zeppelin and stuff, right?
Well...what makes Led Zeppelin's 'Trampled Underfoot' rock music, and what makes, say, Earth Wind & Fire's 'Shining Star' not rock music? After all, both are from the mid-1970s, or thereabouts, and both are heavily influenced by Stevie Wonder's 'Superstition' by all accounts. Similarly have a listen to Rod Stewart and the Faces here doing 'I Know I'm Losing You' vs. Rare Earth, who also did a version around the same time (Rare Earth were signed to Motown and it's Motown's (largely black) backing band playing on it). After all, music is physically just vibrations of the air; in defining a genre, we're specifically categorising some particular vibrations as being different to another, but these categories are largely arbitrary from a pure physics point of view, and there's plenty of music that straddles the barriers of the largely arbitrary fences we've erected.
So what makes us bother with these arbitrary categories? Well, culture. With pop music especially, what with it being inherently commercial, based around an industry that mass markets objects to be consumed, genres are generally a marker of demographics in some ways. This is literally the case for, say, the Billboard charts, for whom the various charts that have over the years been called 'race music' or 'R&B' or 'rhythm & blues' or 'hot R&B/rap singles' are, essentially, a marker of what African-American people in the US listen to. After all, African-American people in the US have a distinct culture to white Americans, born of their different circumstances (e.g., black Americans have historically a different relation to authority in America to white Americans for fairly obvious reasons - when the country you live in in generally racist towards you, it does tend to shape the way you see the world).
And Billboard magazine's 'race music' charts were originally effectively trying to be a marker of what African-American people are listening to, in order so that various commercial interests can market more effectively to them - so radio stations have a better idea of what African-Americans would like to listen to, so stores catering to African-American audiences can have a better idea of what music they should play over the PA. Etc. Broadly speaking, if you have two distinct cultures, it's unsurprising that people who grow up in one culture, broadly speaking, end up having different tastes to those who grow up in another culture. And so what did happen in the 1970s and 1980s was that a set of musical markers associated with 'rock music' were understood to appeal to one demographic (white people), while a different set of musical markers associated with 'funk' or 'soul' appealed to another (black people).
So if we go back to 'Trampled Underfoot' and 'Shining Star', the difference there is that, despite the similarities in the songs born of the 'Superstition' influence, 'Trampled Underfoot' has the musical markers of 'rock music'. Most obviously, the guitars and drums are louder in ‘Trampled Underfoot’. In terms of the feel of the music, pop musicians talk about 'the pocket' which is basically the space around the note. Some musicians play ahead of the beat, some play behind the beat. Rock music tends to be a little ahead of the beat, which is interpreted as excitement and energy by rock music's audiences. In contrast, a band like Earth Wind and Fire would likely be generally playing on the beat, or maybe slightly behind the beat, and might have a relatively subtle swing to the music (e.g., with an on-beat eighth note typically being a little bit longer than an off beat). And of course, soul music of the 1970s likely had guitars just like rock music, but also probably had a horn section and keyboards and more backing vocalists (etc) - generally the music was made by a larger ensemble. Led Zeppelin have a three piece band and a singer; Earth Wind And Fire, circa 1975, had a much larger ensemble, with drums, percussion, bass, keyboards, a horn section, a couple of guitarists, and several vocalists. All of which means that the drums and guitars aren't quite as loud as in rock music comparatively, what with the other instruments that need to be heard. There's plenty of other differences - but remember that these differences are generally the musical differences that ended up being the ones that mattered to people.
If we come back to this genre of 'rock music', you may have noticed that it has a sort of Rolling Stone-sponsored Official History which starts with Elvis and Chuck Berry, and then there's the Beatles and then there's all that psychedelic stuff, and then the dream was over, and the 1970s got prog rock and then punk and new wave (etc etc). Of course, the act of creating a narrative out of a diverse range of music which came and went and often sounded different. This Official History is, shall we say, the one that reflects the tastes and perceptions of white male baby boomers, and their experience of the way that music changed over the years, and which bits were connected. However, there are also (strong) arguments against this Official History, encapsulated in Elijah Wald's book How The Beatles Destroyed Rock'n'Roll. Wald argues that the rock'n'roll music before the Beatles was actually an entirely different music to the rock music that came after, and that the Beatles were the thing that caused the shift from rock'n'roll to just rock.
The rock'n'roll music of the 1950s, broadly speaking, is not much more than fun, energetic dance music that was derived from 1950s rhythm & blues music, but which was fairly squarely aimed at (white) teens (and which thus had a more pronounced country influence and different ways of approaching the rhythms). It's loud and raucous compared to, say, Frank Sinatra or Peggy Lee, but it's basically frivolous lyrically compared to, I dunno, Nick Cave songs or something. A wop bop a loo bop a wop bam boom! There are some crucial and quite real differences between rock'n'roll and rock - for starters, the guitar was not as crucial to rock'n'roll as it was to rock - Jerry Lee Lewis and Little Richard were piano players, after all. And 'rock' has a particular aesthetic about authenticity that an Elvis or a Chuck Berry just does not have - nobody cared if they wrote their own songs (though Berry did). 'Rock'n'roll', generally, didn't involve self-contained bands - it was mostly focused around star singers, perhaps with a backing band.
There certainly were black pioneers in the rock'n'roll field - Little Richard, Chuck Berry, The Coasters, etc - but generally speaking, this was an accident as far as white culture/the music industry was concerned. The mainstream recording industry was relatively slow moving, and was at best indifferent to this style of music (often industry figures railed against rock'n'roll music - most famously Frank Sinatra said that Elvis's music was 'the most brutal, ugly, desperate, vicious form of expression is has been my misfortune to hear'). As a result, smaller record labels with less prejudices against black-influenced dance music were very happy to fill that gap, and most of the black rock'n'roll pioneers who were successful and influential were on minor record labels as opposed to the major labels - Little Richard was on Specialty, Chuck Berry was on Chess, The Coasters were on Atlantic. Very few major labels at this point signed and actively promoted black rock/R&B artists - ABC did sign Ray Charles in the late 1950s - and it's pretty likely that this was motivated by either racism or perceptions of racism amongst audiences; this was the era of Pat Boone's bowdlerised versions of rock'n'roll songs. And Chuck Berry deliberately attempted to appeal to white audiences, toning down the 'blackness' of his music (which you can hear in comparison to much of the other much 'blacker' music on Chess Records - the record label that also released music by Muddy Waters and Howlin' Wolf) and deliberately incorporating influences from white music - 'Maybellene', his breakthrough hit, was partially based on a country song, 'Ida Red'.