Proto-Indo-European is generally reconstructed as having three series of "velar" stops: the "plain velar" series *k *g *gʰ, the "palatovelar" series *ḱ *ǵ *ǵʰ, and the "labiovelar" series *kʷ *gʷ *gʷʰ. The names are conventional; it's generally accepted that the "palatovelars" were more fronted than the "plain velars", but the contrast might have actually been e.g. velar versus uvular instead.
In the centum languages, the "plain velar" and "palatovelar" series merged, while the "labiovelar" series remained separate. In Latin, for example, both *k and *ḱ are normally reflected as c, while *kʷ is normally reflected as q.
In the satem languages, on the other hand, the "plain velar" and "labiovelar" series merged, while the "palatovelar" series turned into sibilants of some sort. In other words, Sanskrit k usually comes from PIE "plain velars" and "labiovelars", as opposed to ś from the "palatovelars".
(And in some other branches, like Anatolian, all three remained separate: PIE *k *ḱ *kʷ are generally reflected as k z ku in Luvian, for example. These languages can't really be called centum or satem.)
Somewhere in the development of Proto-Indo-Iranian, though, there was another palatalization process which turned velar stops into palatal stops/affricates in certain environments. So Proto-Indo-Iranian is generally reconstructed as having two series of palatal or palatal-esque sounds: the "primary" palatals from satemization of *ḱ *ǵ *ǵʰ, written with acutes (*ć *j́ *j́ʰ), and the "secondary" palatals from palatalization of *k *g *gʰ (and their labialized equivalents), written with hačeks (*č *ǰ *ǰʰ).
Many of these sounds merged in Sanskrit, but *ć generally became ś (श), while *č generally became c (च). (We know the rest of them were distinct at the Indo-Iranian stage because they show different reflexes in Iranian languages, even if they merged in Sanskrit.)
Finally, ṣ (ष) often comes from PII *š, from PIE *s after certain sounds (the "RUKI law").