Dont worry! your wig isnt ruined, its just a bit tangled.
You wanna start by letting the wig soak in some lukewarm water and a capful of liquid fabric softener. this will help make the brushing easier. You also want to brush it as SLOWLY and as CAREFULLY as possible!! dry brushing wigs makes them frizzy and you lose the soft texture. Brush it a small section at a time, starting from the bottom up, this minimalizes fibers ripped out. And yes, fibers will be pulled out but not much.
Now you DO want to take a hair straightener to it. Moderate to High heat if the wig is heat resistant and the lowest setting possible and heat protectant spray if it isnt HR. Or go with simmered water. the water method wont restore the texture though. Running it through the straightener will improve texture but you have to brush it out quickly to cool it in an instant. if youre worried about the wig melting with the straightener, run a very small lock of fibers to test if it can handle the heat. A few strands wont kill it.
Now with curling there are a TON of options! I find using foam curlers work the best for curls. the foam rollers come in a variety of sizes. But your wig I would recommend the 1" to 1 1/2" rollers for loose curls like your wig was.
On your wig head, You can run your straightener though a segment of fibers and quickly roll it in the rollers or set in the rollers and poor simmered water over it (150 degrees F to 170 degrees F ONLY). Using the straightner and roller method gives you longer lasting and faster setting curls, usual wait time is 3-4 hours compared to 2-3 days for air drying the simmered water method.
spray with a little bit of Extra hold hairspray and youre good to go!
Another thing, NEVER lend your wigs to friends. You may love them, but you dont know their methods of taking care of wigs