"옛 생각이 나. 니 셍각이 나"
- 생각: a thought.
- 나다: come out, come forth. ("나" is the plain, present tense conjugations of 나다).
- XX(의) 생각이 나다: a thought of XX comes (to one's mind) => think of, remember XX.
생각이 나다 is broadly used for thinking of something, and if the thought is about the past, it is remembering.
기억하다 is strictly "remember". Both 생각나다 and 기억하다 are widely used to mean "remember something".
옛 생각이 나: Thoughts(생각) of the old times(옛) come(나) to my mind => I think of (remember) the old times.
니 생각이 나: Thoughts of you(니) come to my mind => I think of (remember) you. (니 should be 네 to be correct)
You could also say: "옛날 기억이 나, 네 기억이 나". (옛날 = old times)