Albert Einstein's clearest definition of locality, and also of why locality is an essential part of the scientific world view, is contained in an article he published in 1948 in the journal Dialectica. (The whole article is published, in English translation, in The Born-Einstein Correspondence, but Max Born has, for some reason, mistranslated Einstein's Principle of Local Action as "Principle of Contiguity", thereby deflecting Einstein's message somewhat). The crucial sentence reads as follows
The following idea characterises the relative independence of objects far apart in space (A and B): external influence on A has no direct influence on B; this is known as the Principle of Local Action, which is used consistently only in field theory. If this axiom were to be completely abolished, the idea of the existence of quasienclosed systems, and thereby the postulation of laws which can be checked empirically in the accepted sense, would become impossible.
This view of how interactions propagate through space should be contrasted with the primitive magical view (which is also the view of QM(;-))
The fact that QM requires, through its description of the measuring process, that two systems, A and B, can directly influence each other, without any mediating field and in contradiction with this locality principle, was already established by Einstein, Podolsky and Rosen (this is often referred to as the EPR article) in 1935. EPR's argument was based on a "thought experiment" which nobody has ever succeeded in doing, and so it served only to define (at least) two schools with rival views as to its outcome. But, in 1964, John Bell published an article showing how the EPR argument could be greatly simplified by observing a simple property of A or B called its spin. The simplification arises because the spin can take only TWO possible values, and QM indicates that a measurement of the spin of A actually produces a change in the spin of B.
In its ideal form, which, however, nobody has yet succeeded in doing, Bell's experiment would require us to look at the spins of two atoms which are produced by the disintegration of a diatomic molecule. Bell's inequality expresses certain limits, arising from the Locality principle, on the possible values of the spin correlations between A and B, for various alignments of the spin analyzers. All of the experiments so far to test this inequality have been done, not with atoms, but with photons, which are much more shadowy objects than atoms. The QM description of these objects treats their polarization on the same basis as the spin of an atom. But the claims, by the experimenters, that they have proved nonlocality are all based on the assumption that this corpuscular description of the light field is the correct one. They make no serious challenge to the view of Einstein, which I have cited above, since that is clearly based on an undulatory view of the light field.
See also the Aspect experiment.