Honestly, I'm not sure.
I just kinda learned it myself by playing around.
If you have a software that uses "chroma-key" it'll remove the green/blue screen and it makes the video transparent.
Then send another video or an image to the back of the other green screen video so that it looks like a background.
Again, I'm not sure how else to put it into words, it's just how I did it.
Then I added a few extra steps to spice up the meme a little (like effects, watermark, etc...)