In addition to activating Google Messages Screen Effects by using certain text phrases, the animations are also called up by ...
The overall feel of the feature seems similar to a green screen, though Instagram's version appears to be limited to static images, not video or more complex effects. Still, it look fairly impressive.