If we're talking about wool carpets.....Indents from light furniture aren't too serious, because it will only be the pile that is crushed. As said above, simply wetting them and gently brushing up the pile should improve them a great deal. The ice cubes thing is a load of tosh, and potentially dangerous as it could lead to over-wetting and browning. Have seen it myself quite a few times.
With heavier furniture the indents will be permanent. You have to remember there are 3 things on top of each other: the pile crushed, the backing of the carpet stretched and the underlay crushed underneath that. Even if you can bulk the pile back up, the other two elements of the problem will remain unchanged.
With polypropylene, it has a high memory so you probably won't be able to do much about it. However they should lessen over a longer period of time if constantly brushed back up. Heat can help a bit.
Nylon is somewhere between the two.