what script to update Person record fields to ADS/AD (fully managed)

May I clarify the mechanism of Person record -> ADS -> AD

if i update the department of a person record, how the information being sync to ADS (fully managed) then AD user object. May i know which script is running for the update assuming the Person record is fully managed the AD account already

THanks
Gary