Marshmallows are filled with air bubbles that have been whipped into a viscous gelatin solution together with sugar or syrup and, optionally, egg whites. The gelatin helps stabilize the air bubbles and create the characteristic elastic texture of marshmallows.