Remove the molding from around the room using a prybar to pull it away from the wall.
Pull up the carpet at the end of the room, in a corner. Remove it from the tack strip running along the length of the room and roll it up.
Pull up any nails from the carpet padding.
Pull the old padding up. Any portions adhered to the floor will stick.
Apply adhesive remover appropriate for the floor you have. Use concrete or wood adhesive remover.
Scrape the adhesive once it has time to react with the adhesive remover and scrape it off with a dull paint scraper.
Wipe the area with a towel and apply more adhesive remover if necessary.