Microscopic mechanisms of giant magnetoresistance