A fantasy is a situation imagined by an individual or group, which does not correspond with reality but expresses certain desires or aims of its creator. Fantasies typically involve situations which are impossible (such as the existence of magic powers) or highly unlikely (such as world peace). Fantasies can also be sexual in nature.
In the theory of psychoanalysis, phantasy is used to describe unconscious desires, fears, drives etc. Sigmund Freud used the German word 'Phantasie', which could be translated as 'fantasy', but the meaning is clearly not the same as the everyday meaning and is usually printed as 'phantasy'. This should be strongly contrasted with delusion.
An adult who constantly seems to be living in a fantasy world may be considered a Walter Mitty character.