Are you sure you've heard the first consonant changing, not the last one?
If we pronounce "как" separately, it's [kak]. But the sound of "к" changes to [g] when it is followed by a voiced consonant. For example, the next word starts with a voiced consonant.
Как дела? [kagdilA] How are the things, how are you
but
Ну, как? (pause) Дела нормально? [nu,kak?(pause) dila narmAl'na?] So what's (new), are the things going ok?
Later you will notice it happening with other consonants.
Here is the list of unvoiced/voiced consonants and examples
К-Г вокзал [vagzAl], к is followed by a voiced consonant з, so к becomes [g]
Т-Д отдыхать [addyhat'], т is followed by д, so т becomes a voiced consonant too.
Ф-В тариф за газ [tarivza gas] (Note: if you say things like that with pause, you will say [tarif (pause) za gas]
Ш-Ж ваш день [vazh den']
С-З поезд [pOjest]
П-Б укроп дикий [ukrObdIkij]
Exception: letter В doesn't change the sound of the preceding letter.
ЗдравстВуйте! [zdrAstvujte] (т stays т)
швед [shvet]
Also, these letters don't change the sound of the preceeding ones:
Л,М,Н,Р