The oxidizing agent gains electrons and is reduced, while the reducing agent loses electrons and is oxidized.