Marshmallows contain mostly water and sugar. When microwaved, the water heats up, so do the air bubbles in the marshmallow, and they thus take more space. Since sugar tends to soften when heated up, the marshmallow's structure will puff up as the air bubbles expand.