There is no magic.
It is called scaling via interpolation.
A DVD has 480 lines
HD is 720 or 1080 lines. An upconverter "guesses" the missing lines.