Cut the foam carpet pad into manageable strips, using a utility knife. Do not cut so deeply that it scratches the floor underneath.
Pull back the edge of one strip of the foam carpet pad, using pliers. Do this slowly to avoid tearing the carpet pad.
Soak a sponge with mineral spirits and apply underneath the area where the foam carpet pad is stuck to the floor.
Scrape up the foam carpet pad strip, using a putty knife, while simultaneously pulling back the carpet pad with pliers. Start on one strip at a time and gradually work your way across the entire pad. Be careful to not scratch the floor.
Soak a clean cloth in mineral spirits and clean up any glue residue left on the floor after you have removed the foam carpet pad.