What is Loki's Wand used for? - Titan Quest: Ragnarok
Loki's Wand is a quest item which you can get as a drop off of Loki the final time you battle him in Land's End during Act 5. Despite it being a quest item there is no official quest in the game that this item is used for, while it is used for a quest the quest is "Hidden" which is sometimes why this is referred to as the "Hidden Quest" as well.
Once you have obtained Loki's Wand you'll need to bring it to King Gylfi's Settlement (Scandia Portal) and into King Gylfi's Hall. Assuming that you freed Ylva from Utgard Prison during The Wisest Being Story Quest she will be here waiting for you. If you skipped Ylva take a look at my map screenshot below for the location of Utgard Prison where you can find her.
In King Gylfi's Hall all you need to do is approach the stone statue in the center of the room to free him (pictured below). You'll then be able to interact with him which you'll need to do before speaking with Ylva again. With the King free Ylva will offer to help you whenever you need her to, just speak with her and she will join your party as a pet.
Ylva is a mediocre pet at best, she will benefit from any buffs that you have but obviously not from any of your Skills like your normal pets would. To make matters worse, Ylva is typically focused like all NPCs are in escort quests which will result in her dying pretty quickly. Once Ylva dies you will need to log out and back in then you will be able to return to King Gylfi's Hall and speak with her again to gain her as a companion. As far as I am aware you can return here and keep selecting her as a companion as much as you desire, you just have to log out first.