Waifu is a term used by Japanese men when referring to their wives. Its usage predates Azumanga Daioh, though it was through said series that the word became known to the Western audience and acquired Internet meme status. It became popular through a scene in chapter 11 of the manga and episode 15 of the anime when the main cast members were confused to find a picture of a pretty woman that Kimura dropped, and he explained that she was his wife by calling her "Mai Waifu". Its popularity started in the later half of the 2000s and as of today, the word is typically used by otaku when referring to their favourite female anime character. It is sometimes applied to non-anime characters and even real-life celebrities, but not as frequently.
In turn, "Mai husbando" can be used for male characters, though it is more rare (even though the correct romanization of the word "husband" in Japanese would be Hasubando).
The otaku habit of referring to characters in this way, and sharing posters of them, has sometimes been mocked by people failing to see the appeal of idealizing fictional characters.
It was often used on 4chan, to the extent that a FAQ was created to answer people's questions about what it meant to have a "Waifu".
- Waifu on Know Your Meme