A common parting phrase or warning, literally 'attach your attention'. Used when seeing someone off or cautioning them.
気を付けて行ってらっしゃい。
Take care on your way.
車に気を付けてください。
Please be careful of the cars.
気を付けて tells someone to be careful or watch out, while 気にする means to worry about or mind something, so despite sharing 気 they are not interchangeable.
Standard kanji-kana spelling for this expression.
Kana spelling of the particle を is common in casual writing.
From 気 (attention, spirit) + を + 付ける (to attach), literally 'attach your attention'.