[noun] + に気がつく
[verb (plain)] + ことに気がつく [i-adj (plain)] + ことに気がつく [na-adj な] + ことに気がつく [noun だ → な/である] + ことに気がつく
Note: つく is a regular godan verb – conjugates as つく・ついた・つかない etc.
The expression に気がつく means "to notice" or "to realize." It describes the moment when someone becomes aware of something they hadn't perceived or understood before. Literally, it means something like "one's awareness (気) attaches (つく) to (に) something."
When noticing a concrete thing, attach にきがつく気がつく directly to the noun.
When noticing a fact or situation, use ことに気がつく after a plain-form clause.
Since つく is a regular godan verb, it conjugates normally:
きづく気づく is a more compact compound-verb form with the same meaning. Both forms are natural and interchangeable in most contexts, but きづく気づく is slightly more common in casual speech and writing.