Just to expand Paco answer to explain a little bit more the concept, lets take an easy example. The letter C will be ok I think.
When the letter that comes after C is a, o, u or any consonant, or when the letter C is the last letter of the word, you pronounce C as k. Some examples are frac, técnico, casa, cosa or curioso. In other case you pronounce C as s or z depending on the region and country.
Note that doesn't change the pronunciation of the vowels: casa doesn't pronunciate as kaisa, keisa or any other. The letter a keeps it own pronunciation whatever happens with C. Also in técnico both letters C and N keeps their own pronunciation, you just pronounce them one after another.
What happens with words that pronounce as k but have e or i? In that cases you use "qu" and don't pronounce the vowel u.
F.I. the words que, quitar, querer, pronounces as ke, kitar, kerer. As before, the rest of the letters keeps their own pronunciation.
So, as Paco said, all the thing is pretty consistent, and almost always you'll pronunciate each letter their own way, only one way.
But, as Paco said too, it's not a perfect 1:1 relation, there are some exceptions that you have to study and practice. There are not so much exceptions, I think five or six rules like the C one, but yes, they exists and you have to study them.