The special triangle you need is a right isosceles triangle, with legs 1 and hypotenuse
.
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

which indeed is both the sine and cosine of 45°
Its approximated value is 0.707...