Actually I have found that the concept of chain rule which deals with derivatives of composition of functions is best explained in terms of what one might call "inner" and "outer" function. If we are considering the composition $$(f\circ g)(x) = f(g(x))$$ then $g$ is the inner function and $f$ the outer function. Or perhaps we can think of the order in which the functions are applied on $x$ to get the value of $(f\circ g)(x)$. The one which comes first in order is the inner function and the one which comes after is the outer function.
Now the chain rule says that to differentiate a composite functions the derivatives have to be taken in reverse order of composition so that first we differentiate the outer function (its argument is the same after differentiation) and then multiply it with the derivative of the inner function.
Let's take the case of $f(x) = \cos^{6}x$. This is clearly a composite function and to find the inner/outer functions here one should ask the following question: Starting from $x$ how do I get to the value $\cos^{6}x = f(x)$? The answer is simple: first I apply $\cos$ on $x$ to get $\cos x$ and next I raise the result to $6^{\text{th}}$ power. So $\cos$ is the inner function and raising to power $6$ is the outer function.
To differentiate $f(x)$ we perform differentiation in reverse order. Thus we first differentiate the function which raises $\cos x$ to $6^{\text{th}}$ power. Raising to a fixed power reminds us of $x^{n}$ and its derivative $nx^{n - 1}$ and here $n = 6$. So we have the term $6(\cos x)^{5}$ and then multiply this by the derivative of inner function $\cos$ i.e. we multiply it by $-\sin x$. The final answer is thus $f'(x) = \{6\cos^{5}x\}(-\sin x) = -6\sin x \cos^{5}x$.
I think it is better to take one more example related to the above function $f(x)$. Let us consider $g(x) = \cos (x^{6})$ which is also written as $g(x) = \cos x^{6}$. We again ask the question: how do I get from $x$ to $\cos x^{6}$? Well I now raise $x$ to $6^{\text{th}}$ power first and apply $\cos$ on the result.
To differentiate I proceed in reverse order. I first differentiate $\cos$ to get $-\sin (x^{6}) = -\sin x^{6}$ and multiply it with the derivative of $x^{6}$ i.e. $6x^{5}$ and thus $g'(x) = (-\sin x^{6})(6x^{5}) = -6x^{5}\sin x^{6}$.
The hurdle in applying chain rule comes because of difficulty in identifying the inner/outer functions. Note that these functions must themselves be simple enough (in the sense that they are not themselves composite) and there should be a direct formula available to differentiate them. The mistake by OP here is to identify the functions as $\cos^{6}$ and $x$. This is wrong because $\cos^{6}$ is the function which is itself composite of $\cos$ and raising to power $6$. You always need to pick the functions which are not composite themselves.
Naturally the chain rule applies to a composition of more than two functions also. And again we need to find exactly how we can reach from $x$ to the final value of function for $x$ and each step must be a simple/non-composite function applied to the result of previous step. Differentiating the final composite function would then work by taking derivatives of functions in reverse order i.e. the function of last step is differentiated first. Thus the function $$F(x) = \cos\log\arctan x^{2}$$ is thought of in steps as $$x \to x^{2} = A \to \arctan(A) = B \to \log B = C \to \cos C = F(x) \text{ finally!}$$ and then by reversing the steps $$F'(x) = (-\sin C)\left(\frac{1}{B}\right)\left(\frac{1}{1 + A^{2}}\right)(2x)$$ or $$F'(x) = -\sin(\log\arctan x^{2})\cdot\frac{1}{\arctan x^{2}}\cdot\frac{1}{1 + x^{4}}\cdot 2x$$ which can be simplified further.