A digital twin is a detailed virtual model of a real robot and its surroundings, kept in step with the physical one. New programs and layouts can be tried on the twin first, where a mistake costs nothing, before being trusted on hardware that can break or injure.
It also helps diagnose problems, by comparing how the real robot behaves against how the model says it should. The twin is only as good as its fidelity, so keeping it honest against reality is the ongoing work that makes it worth having.