Load and unload chucks of generated terrain

Hello, I’m trying to figure out how to generate and optimize terrain. It turned out to write an algorithm that renders a terrain(Still need to slightly modify the values of the simplex noise)

Question:
You cannot create an “infinite” map without unloading and loading its parts.
Therefore, I want to know: how to unload and load chuncks of the terrain? I am not talking about level streaming, this is completely wrong.
There is a plugin that works perfectly, but I absolutely cannot understand how do they do this.

I’m doing this for my personal interest, so if I will be able to generate a normal optimized terrain - I’ll definitely post the code.