Not quite what you wanted?
In most cases, you needn't feel guilty about exchanging a gift; the giver's aim was to please, not to give you a sweater that will forever hang in the back of your closet. If the item was the wrong size, there's no reason not to report the exchange to the giver and tell her how much you enjoy the new item. It's trickier if you just don't like the gift and would just trade it for something else. In this case, not letting your friend know demonstrates tact - the quality defined as "the ability to appreciate the delicacy of a situation and to do or say the kindest thing." The time not to exchange is when you've received something so unique - like a one-of-a-kind painting - that the gift giver would undoubtedly be hurt if you traded it in for something else. You'll know when extra thought has gone into the gift selection.
Many stores make exchange easier and less awkward by enclosing a ticket in the gift box that doesn't show the price. However, if the recipient wants to exchange a shirt for a sweater, the price differential will make the price of the gift obvious.