Baby oil, wide toothed comb, and hoof pick. And lots of time.
After massaging oil into the tail let sit for about 10 min or so to really soak in. I like to use the hoofpick to break the tail into about 3-4 sections, then use the comb and your fingers to pull away a few hairs at a time. Don't try to do too much at one time or else you will pull hairs out and loose a huge chunck of the tail. After you have everything out and the tail is combed back out with all snarls removed then give it a good washing, because that baby oil with clog up the hair folicles, get nasty and ultimately destroy it. Also leaving oil in like that you run a higher risk of getting a nasty knot.
The wind of heaven is that which blows between a horse's ears. ~Arabian Proverb