Heavy furniture can leave indentations in carpet. To prevent this, put furniture glides or cups under the furniture legs, or occasionally move your furniture a couple of inches to give your carpet a break.
When areas have become crushed, use a coin to work the carpet pile back upright, and then hold a steam iron not more than 4 inches above the spot (don't touch the carpet!) until the iron warms the fibers.