Twin Earth is a thought experiment by philosopher Hilary Putnam, first in his paper "Meaning and Reference" (1973), and then in his paper "The Meaning of 'Meaning'" (1975), to illustrate his argument for semantic externalism, or the view that the meanings of words are ultimately not purely psychological. The Twin Earth thought experiment was one of three, the other two being the Aluminum-Molybdenum, and the Beech-Elm cases. Since the publication of these cases, philosophers have proposed numerous variations on the experiment.
Putnam's original formulation of the experiment was this: We begin by supposing that elsewhere in the universe there is a planet exactly like Earth in virtually all respects, which we refer to as "Twin Earth". (We should also suppose that the relevant surroundings are exactly the same as for Earth; it revolves around a star that appears to be exactly like our sun, and so on). On Twin Earth, there is a Twin equivalent of every person and thing here on Earth. The one difference between the two planets is that there is no water on Twin Earth. In its place there is a liquid that is superficially identical, but is chemically different, being composed not of H2O, but rather of some more complicated formula which we abbreviate as "XYZ". The Twin Earthlings who refer to their language as "English" call XYZ "water". Finally, we set the date of our thought experiment to be several centuries ago, when the residents of Earth and Twin Earth would have no means of knowing that the liquids they called "water" were H2O and XYZ respectively. The experience of people on Earth with water and that of those on Twin Earth with XYZ would be identical.
Now the question arises: when an Earthling (or Oscar for simplicity's sake) and his twin on Twin Earth say 'water' do they mean the same thing? (The twin is also called 'Oscar' on his own planet, of course. Indeed, the inhabitants of that planet call their own planet 'Earth'. For convenience, we refer to this putative planet as 'Twin Earth', and extend this naming convention to the objects and people that inhabit it, in this case referring to Oscar's twin as Twin-Oscar.) Ex hypothesi, their brains are molecule-for-molecule identical. Yet, at least according to Putnam, when Oscar says 'water', the term refers to H2O, whereas when Twin Oscar says 'water' it refers to XYZ. The result of this is that the contents of a person's brain are not sufficient to determine the reference of terms they use, as one must also examine the causal history that led to this individual acquiring the term. (Oscar, for instance, learned the word 'water' in a world filled with H2O, whereas Twin Oscar learned 'water' in a world filled with XYZ.)