As an adjective meaning "futile" or "pointless":
* All her efforts to save the company were vain, as it eventually went bankrupt.
* It was a vain attempt to reach the summit before nightfall.
As an adjective meaning "excessively concerned with one's appearance":
* He was a vain young man, obsessed with his looks and constantly checking his reflection.
* The actress was vain about her youthful appearance, refusing to accept her age.
As a noun meaning "something that is worthless":
* All her dreams turned out to be vain.
* The king was surrounded by flatterers, who fed his vanity and made him believe he was invincible.
In an idiom:
* "In vain" means "without success": I tried to call her, but it was in vain - she didn't answer.
* "Vanity fair" refers to a place or situation full of superficiality and pride: The fashion show was a vanity fair, with models flaunting their designer clothes.