The Slavic second palatalization is a Proto-Slavic sound change that manifested as a regressive palatalization of inherited Balto-Slavic velar consonants that occurred after the first and before the third Slavic palatalizations.

Motivation
The second palatalization of velars is a direct consequence of the monophthongization of diphthongs, or more precisely, the change *aj > ē. While *kaj, *gaj and *xaj were in accordance with the principle of so-called intrasyllabic synharmony that operated during the Common Slavic period, the resulting *kē, *gē, and *xē defied the intrasyllabic synharmony. Namely, the velars ended up in front of the front vowel ē, and this contradicted the Proto-Slavic phonotactical constraints.

This anomaly was resolved by palatalizing the velars, just as during the first palatalization. However, the results of the second palatalization were different and not completely uniform across Slavic territory, indicating one of the first dialectal differences. Usually, this palatalization is described as gradual, with fronting to proper palatals occurring first and then (perhaps with those that were affected with the third palatalization) assibilation. Hence it is sometimes called sibilantization.

In addition, the same process operated before the new instances of *i deriving from *oj.

Formulation
The inherited velars *k (< PIE *k, *) and *g (< PIE *g, *, *, *) change before the Proto-Slavic diphthong *aj/āj (< PIE *oy, */ay), which itself must have become *ē by the time the second palatalization started to occur:
 '*k > *t > c 
 '*g > *d > dz > z
Proto-Slavic velar fricative *x that was absent in PIE, and which arose primarily from PIE *s by means of RUKI law, from word-initial PIE #sk- as well as from Germanic and Iranian borrowings, changed in the same environment as:
 '*x > *ś > s/š
The ultimate output of the third palatalization is thus the same as that of the preceding second palatalization. The difference of the palatalization of *x is dependent upon chronology and the Slavic dialect in question: In East and South Slavic it is /s/, and in West Slavic languages it is /š/. Slovak tends to match South Slavic in such instances, e.g. Čech "Czech", plural Česi "Czechs".

Compare:
 PIE *koylo- > PSl. *kajlu 'whole, healthy' > OCS cělъ, Russ. célyj, Pol. cały

The intermediary /dz/ has been preserved only in the oldest Old Church Slavonic canon monuments, Lechitic languages, and the Ohrid dialects of Macedonian. Other Slavic languages have younger /z/.

Second palatalization alternates s-consonant clusters specifically:

In South Slavic languages the second palatalization operates even if medial *w (> OCS v) is present between the velar and the diphthong (or its reflex), whereas in West Slavic languages the original *kvě/gvě clusters are preserved. Although words with groups cv, zv resulting from the second palatalization are found in East Slavic languages, they are likely to be a consequence of the Church Slavonic influence, since there is evidence of preservation of the original groups in Ukrainian and Belarusian and in some Russian dialects. Compare:
 PSl. *gwajzdā 'star' > OCS zvězda, but Pol. gwiazda, Cz. hvězda
 PSl. *kwajtu 'flower' > OCS cvětъ, but Pol. kwiat, Cz. květ, Ukr. kvitka, Belarus. kvetka, Russ. dial. kvet

In natively coined and inherited Slavic words, the second palatalization occurs only before the new *ě < *aj because the first palatalization already operated before all the other front vowels, but in loanwords, it operates before all front vowels. Compare:
 Latin acētum 'vinegar' > Goth. akit- > PSl. *akitu > OCS ocьtъ
 Germanic *kirikō 'church' > PSl. *kirkū > OCS crьky

Interpretation
The second palatalization probably spread from the south of the Slavic speech area; it started to operate sometime between the end of the sixth and the middle of the seventh century AD, and the environments in which it operated varied.

In Russian, Slovak and (in nouns) Slovene, the results of the second palatalization were later removed at morpheme boundaries (i.e. before inflectional endings) due to paradigmatic leveling by analogy.

In Ukrainian and Belarusian, however, the effects of second palatalization are still evident in such cases.

Compare:
 Old East Slavic ruka 'hand', L. rucě
 Russ. ruká, L. ruké
 Ukr. ruká, L. rucí
 Belarus. ruká, L. rucé

For Northwest Russian varieties (Novgorod, Pskov), according to Zaliznyak, the second palatalization did not take place at all (E.g. Pskovian kev''' : OESl. cěvь: Old Novgorod *kělъ : OCS cělъ'').

According to others, however, such apparent unchanged velars were actually palatalized dentals both in the older monuments and in the modern varieties (so such #k- would in fact be [t']). So the only exception with these varieties would be the non-occurrence of the affrication normally brought on by the second palatalization.

Notes

References
 
 
 

Proto-Slavic language

bg:Палатализация в славянските езици#Палатализация на съгласните под влияние на окръжаващите ги гласни