Twin Earth, philosophically

Twin Earth may also refer to a thought experiment by philosopher Hilary Putnam that argues against an internalist account of meaning. The experiment was the basis for Putnam's semantic externalism, the view that words in our language have the meanings they do in virtue of relations between us and our environment. Briefly, the experiment is as follows:
There exists another planet that is exactly like yours in almost every single way - call it Twin Earth. The only difference is that the substance called water on Twin Earth is not composed of H2O but rather XYZ. XYZ looks, behaves and tastes exactly as H2O does; their atomic structure is the only thing that sets them apart. When you and your Twin Earth doppelganger point at glasses of clear, potable liquid and say "This is water", do you mean the same thing?

According to Putnam, no. The word 'water' may be used in all the same ways on Twin Earth as on Earth, but on Twin Earth it refers to XYZ and on Earth it refers to H2O. When you say the glass is filled with 'water', a term you learned on H2O-rich Earth, you are necessarily thinking about H2O (whether or not you know anything about its chemical composition). Your doppelganger, in the same situation on his XYZ world, is necessarily thinking about XYZ.

This serves as a demonstration that you and your Twin Earth doppelganger could have physiologically identical brain states (ie, when saying a glass is filled with 'water') but be thinking of different things. The contents of the mind, therefore, are insufficient to determine the reference of a thought. Or as Putnam puts it, "'meanings' just ain't in the head."1 Instead, he believes, we are compelled to adopt an externalist view of meaning that takes into account the causal relations between us and our environment.

1 Putnam, H. (1975/1985) "The Meaning of Meaning". In Philosophical Papers, Vol. 2: Mind, Language and Reality. Cambridge University Press.