People learn a deterministic way to sound a word at school, same for everyone. The very fact of having that as part of education tends to stabilise the language to a degree: I can read 16 century poems and stuff sounds the same and rhymes perfectly.
Most local variations and accents will deviate in semi standard ways: For example, southern spaniards will usually use the same sound for S and C (which in Spain's Spanish is the famous 'lispy s' sound). So in general people are aware of what is part of the standard and what is a local characteristic.
Our educative system makes a point of those variations explicitly not being 'wrong', but sometimes in practice there are ideological debates about this stuff: For example, people might self police in media by adapting to the standard, which in turn draws criticism for "reneging of their identity").