While both technically fall under the banner of jazz, Afro-Cuban jazz and cool jazz tend to be pretty different. Afro-Cuban jazz can often be characterized by the use of extra percussion. Bongos, congas, and other percussive instruments were present in a way they had not been before. In fact, one of the major collaborations of Afro-Cuban jazz was between trumpet player Dizzie Gillespie and Chano Pozo, a percussionist. Cool jazz, on the other hand, tended to utilize a more strictly traditional jazz instrumentation, without any extra percussion.
Another difference between the two types of music is the tone and tempo. Afro-Cuban jazz is often very upbeat, whereas cool jazz tends to be more subdued and downtempo. Miles Davis' Kind of Blue, for example, is a seminal cool jazz album that features slow to mid-range pieces, none of which are as ebullient as something like "Afro-Cuban Suite."
The two genres have similarities, however. Both types of music make use of the instrumental solo. Again, compare Gillespie and Davis — both are hugely influential trumpet players who would take solos on their own songs.
Another similarity tying the genres together is the pool of musicians who would play each. Since the jazz community is rife with collaboration, members of different groups often played in other groups as well. For example, Wayne Shorter was a saxophonist in Art Blakey's Jazz Messengers in the late 50s through the early 60s. In 1964, however, he joined Miles Davis' quintet, where he would play what was termed "free-bop," a genre-bending amalgam of different jazz styles that often bore great resemblance to cool jazz.