The range of a function is all possible output, or #y#, values. The range of #y=cos x# is from -1 to 1.
In interval notation, the range is [-1,1] * Note that square brackets [ ] are used because because #y=cos x# can actually equal -1 and 1 ( for example, if you plug in #x=pi#, #y=-1#).
You can see visually in a graph that #y=cos x# can only equal values between -1 and 1 on the #y#-axis, hence that it is why it is the range. The doimain, however, is all real numbers. You can see that you can plug in all sorts of #x# values, no matter how infinitely small and infinitely large they are- But you will always get a #y# value with the restriction of [-1,1]