What I do is get the tail as clean as possible, and then braid it from the tail bone down as tightly as you can. Then I take a long tube sock and put the braided part of the tail in it. Then I use a shoe lace to tie it on. I start on the back side of the tail just below the tail bone and push it through the sock, tail, and back out the front side of the sock. I do it again going to the back, maybe a couple of times depending on the horse. Then with both ends of the shoe lace coming out the back, I cross them over each other and take them around each side of the tail bag to the front where I tie the shoe lace ends together. Then you can fold the top of the tube sock over it, and presto - your tail is bagged.
I recommend taking it out and redoing it every 1-2 weeks if it stays up nicely, more frequently if the tail is coming down.