The special triangle you need is a right isosceles triangle, with legs 1 and hypotenuse [tex]\sqrt{2}[/tex].
As for every right triangle, you can find of the cosine of an angle using the "adjacent/hypotenuse" ratio.
In this case, the two base angles are equal, and so are the two legs. So, it doesn't matter which angle or leg you'll choose, the ratio will be
[tex]\cos(45)=\dfrac{1}{\sqrt{2}}[/tex]
which indeed is both the sine and cosine of 45°
Its approximated value is 0.707...