[noun] + が気になる [verb (plain)] + の/こと + が気になる [question word] ... + か + が気になる
が気になる says that something is on your mind and you can't stop noticing it. Depending on the thing, that is curiosity, interest or worry. The thing takes が, the person whose mind it is on takes は, and a verb clause needs の or こと before が.
A question clause ends in か, and が after it can drop.
気になる happens to you: the thing catches your attention whether you want it to or not, and it takes が. きにする気にする is something you do: you mind it, you let it worry you, and it takes を. That is why "don't worry about it" is きにしないで気にしないで.
For something that has stayed on your mind, use きになっている気になっている. It is a state that started and hasn't gone away, not an action in progress.
Before a noun, 気になる describes someone or something you've noticed and are drawn to. Said of a person, it usually means you are interested in them romantically.
Don't confuse it with きにはいる気に入る, "to take a liking to": このふく服がきにはいった気に入った is "I like these clothes", not "I'm curious about them".