originally C sounded exactly like K
the reason why they had two letters was because:
C is derived from the greek letter gamma (Γ), which sounds like G. the etruscans didnt have a G but had a K, they didn't hear a difference between G and K so they took Γ and made it their letter for K. they then just forgot about the greek letter kappa (Κ) since Γ took its role.
then the latins came, who had both K and G sounds, so they took the Γ which the etruscans forgeted up into the modern C shape, and they used it for the K sound. they then added a little notch at the end to make G, which they used for the G sound. kappa was still ignored.
later on the latins discovered greece and how cool everything was so they decided to translate everything from greek to latin, but they wanted to keep the names of people and places using the same letters, so K and C had the same role in latin, only K was exclusively used for greek words.
and blah blah blah people started writing C for K and whatever.
however throughout the course of time when C was near the vowels I or E it changed into the S sound, a process known as palatalisation.
that is why C sounds like both K and S.
then theres some weirdness about for example the CK digraph seen in several germanic english words (like cock) which i dont know much about but yeah