[noun] + に + 気をつける [noun] + に + 気がつく [noun] + が + 気になる [noun] + を + 気にする [sentence] + 気がする [noun] + が / を + 気に入る
気 means "mind", "attention", "spirit". It hardly ever stands alone: it joins a particle and a verb in fixed phrases about attention, feelings and moods. The particle is part of the phrase, so きをつける気をつける, きがつく気がつく, きになる気になる and きにする気にする are four different things.
気をつける is "be careful", something you do on purpose, and the danger takes に. 気がつく, or きづく気づく, is "notice": it happens to you, and what you notice takes に too. A clause takes こと before に.
気になる happens to you: something catches your attention or worries you, and it takes が. 気にする is something you do – you mind it, you let it bother you – and it takes を. That is why "don't worry about it" is きにしないで気にしないで.
After a clause in the plain form, 気がする gives a hunch: "I have a feeling that". A noun or a な-adjective goes through ような first.
These go beyond the four everyday phrases and 気がする.
気に入る is "take a liking to". Liking something you have just seen or received is said in the past, きにはいった気に入った; a liking that lasts is きにはいっている気に入っている. The thing liked takes が or を.
With が and an adjective or verb, 気 describes someone's temper or mood: きがみじかい気が短い "short-tempered", きがおもい気が重い "dreading something", きがきく気が利く "thoughtful", きがすむ気が済む "be satisfied".