Fix the Problem Before It Starts
The best way to avoid having matted or tangled doll hair is to brush and comb it with the proper brush. While it may seem like a silly thing and most people think that any brush will do the trick, this is not true. Because doll hair is made of synthetic materials and is not at all like human hair, it's important to use a brush with metal bristles. Metal bristles will allow the strands of hair to be separated easier and they do not create as much static as plastic bristles do. The same goes for combs used on doll hair. Also, do not use brushes or combs that humans have used because they pick up oil from the hair and can further tangle doll hair.
Detanglers
When untangling doll hair, give it the treatment: untangling treatment, that is. Most detanglers sold at drug stores or other general retail stores should do the trick. They are located by the shampoo and conditioner. Spray the detangler onto the doll's hair, just like you'd spray it into your hair. Brush or comb the hair with the metal bristled brush after you spray. This should work, provided the doll's hair is not too tangled. If the doll's hair does not easily untangle after the detangler treatment, something stronger may be needed. Vinyl treatment for cars can help loosen the tangles if the detangler does not work, though the Just Magic website recommends against Armor All because it's too heavy and greasy of a product. Make sure you don't spray too much vinyl treatment on; otherwise, the doll's hair will appear greasy.
Fabric Softener
When detanglers and vinyl treatments fail, Just Magic suggests trying a fabric softener. Using a spray bottle, spritz the doll's hair with a liquid fabric softener. Don't spray too much; a light mist should go a long way. After spraying the doll's hair, use a brush or comb and slowly untangle the doll's hair, beginning from bottom to top.
Baby Oil
Another trick to untangling doll hair is to use baby oil. Any brand will do. Apply a small dime-sized amount to the palm of your hand and then rub the baby oil into the doll's hair. Make sure that you work the baby oil into the hair so that the brush or comb will slide through the locks easier. Again, if you use too much, the hair will appear greasy, so you may want to start with a very small amount and apply more as needed.