How to edit video like this? How they manage to dissolve text only and not themselves??

In some videos text even go over there hands but still texts dissolves and they remains intact..

Example is in this video please go through it 1st is at 4 seconds then at 1:30.
Sit behind a sheet of glass, write, flip video, key dissolve.