Ravel is a contronym, a word that has two meanings that are the opposite of each other. Confusingly, ravel can mean both "tangle" and "untangle." It's perfectly understandable to tangle up the meanings of ravel!
If you work to ravel yarn into a neat ball, your cat may come along and try to ravel it again. How can a word mean both one thing and its opposite? In the case of ravel, the answer is sewing: As threads come unwoven from a cloth, they become tangled on each other. Since untangling is never far from tangling, ravel covers both meanings.