how is it correct: I'm fine (well), or I'm good
"I am well"
This is the most formal/correct form of the common phrase. Literally it means, "I am in good health, spirits, state of mind, etc."
"I am fine"
This means essentially the same thing, is more colloquial, and might be used to indicate a lesser degree of wellness than "I am well."
"I am good"
The word "good" is often used as a synonym for "well" or "fine" in this context, but strictly speaking, "good" speaks of an attribute, while "well" and "fine" speak of condition. The definitions of "good" and "well" demonstrate these differences well.
So, strictly speaking, to say "I am good" is to say "I am a good person. I am of good moral character, etc."
Although people like to label "I'm good" as some sort of terrible "Americanism," the fact is that "I'm fine," "I'm well," and "I'm good" are all grammatically correct, as a quick Google search will reveal. But don't bother with that. Just think about it—"I'm good" is really just nothing more than "I am good" and there's obviously nothing wrong with that.
That said, it may be best to avoid "I'm good" in more formal contexts just for convention's sake.