It feeds the entire previous conversation back into the AI until it reaches the token limit. This isn't a new technique; the first place I saw it was in AI Dungeon (an AI writing/adventure app) back on GPT-2. NovelAI, another writing app, has some interesting tweaks to keep a consistent story, like a "lorebook" to associate words with descriptions, which it then swaps into the input when those words come up so the AI can "remember" farther back. I wouldn't be surprised if ChatGPT has some automated version of this in addition to the naive rolling feedback.