Well, you'd first have to know the following identity.
$$\cos(a\pm b) = \cos a\cos b\mp \sin a\sin b$$
The diagram below demonstrates it perfectly.

From here, apply the general identity.
$$\cos(2a) = \cos(a+a) = \cos a\cos a-\sin a\sin a$$
$$\implies \color{blue}{\cos(2a) = \cos^2 a-\sin^2 a}$$
This can be rewritten by using $\color{purple}{\cos^2 a = 1-\sin^2 a}$ or $\color{purple}{\sin^2 a = 1-\cos^2 a}$.
$$\implies \cos(2a) = \cos^2 a-\color{purple}{(1-\cos^2 a)} = 2\cos^2 a-1$$
$$\implies \cos(2a) = \color{purple}{1-\sin^2 a}-\sin^2 a = 1-2\sin^2 a$$
Therefore, all three expressions are valid for $\cos(2a)$.
Edit: I am now aware that the diagram above is by Blue. You may want to check this link as well:
How can I understand and prove the "sum and difference formulas" in trigonometry?