Place an ice cube on top of the affected spot.
Allow the ice cube to melt. The cold and the moisture reshapes the carpet fiber, returning it to its former appearance.
Blot the wet spot dry with a clean towel.
Wet a towel in warm water and place it over the place where the pile is flattened.
Turn a steam iron on to its lowest steam setting.
Run the steam iron over the towel for 30 seconds. The heat and the moisture makes the pile fluffy again.
Repeat Step 3 if necessary, checking the carpet every 30 seconds.