Equal Temperament
The modern western method of tuning is called equal temperament. This method of tuning didn’t come into practice until the early 20th century. Bach’s well tempered clavier was written for the tuning of the time which was a mean tone temperament. Each piece explores different colours and flavours each key represents. Mean tone temperament was an approximation of our modern equal temperament but provided far more variation in keys. Some keys like B and Ab sounded charged and disagreeable, while others keys such as C and G were purer and more congenial. Some well tempered or mean tone temperaments can be asked for of a tuner if desired to create a more authentic playing experience, though most modern pianos are designed to be tuned in equal temperament. The reason equal temperament is so popular is that keys can be modulated without compromising intervals, modulation being a very common practice among most modern composers.
String instruments are not conformed to a set temperament and most players adjust their fingering ever so slightly depending on which key they are in. However pianos have set notes that cannot be adjusted. Therefore the fifth (or perfect fifth though not actually perfect) is flattened ever so slightly and the fourth is sharpend ever so slightly. This method divides the octave into 12 equal semi tones and provides a pure octave.