Lokoko is a character from the episode "Just Waiting On A Friend." She lived in a mansion alongside a Ninetales, and when Brock met her, he became completely smitten—so much so that he seriously considered staying there permanently. Ash and Misty, however, sensed something was off. They noticed Lokoko had no reflection in mirrors, and whenever they tried to warn Brock about what they'd observed, she and Ninetales would conveniently block their attempts.
After exploring an old room in the mansion, the group uncovered the truth: the Ninetales actually belonged to the mansion's original owner, who had disappeared centuries ago and never came back. Lokoko herself was nothing more than an illusion created by the Pokémon.
During a skirmish with Team Rocket, Brock finally learned what was really going on. Ninetales had kept Lokoko around and wanted Brock to stay because he resembled the mansion's long-lost owner. When Ninetales's Poké Ball shattered during the battle, Brock encouraged the Pokémon to leave and live free. Once it did, both the mansion and Lokoko vanished.
Content compiled by AnimeList.moe from publicly available sources.