Ich bin kalt. → I'm a cold person.
Mir ist kalt. → I am/feel cold.
Ich bin schlecht. → I'm bad/a bad person.
Mir ist schlecht. → I feel bad/sick.
Ich tut der Kopf weh. → doesn't exist
Mir tut der Kopf weh. → My head hurts.
Grammar for nerds:
Did you notice the verb in those sentences? The subject in the dative sentences is es (sometimes only implicitly), not the person in question.
We also have "dummy subjects" in English. Yes, this is what linguists call them!
"It" doesn't really mean anything, but it is the subject of the sentence and therefore we need the -s in the verb → the he/she/it-conjugation.