How to spawn another terrain when reached a checkpoint while destroying the old terrain?

I was thinking something like flappy bird, but instead of the terrain constantly moving to the left destroying the old terrain and spawning a new one, I want the player to move itself and when the player reached a certain distance, the old terrain is destroyed and new one spawned.

A terrain is attached to a Game Object so just like with any object you simply call Destroy(gameObject);

As to when you do that, you need to keep track of your terrains and do a distance check, if the player moves far enough destroy that terrain. I covered some Endless Runner logic like that here Endless Runner Level Generator in Unity - Code Monkey