Whether it's a sine or cosine is just a matter of phase reference. If you are only looking at one signal then there is no relative phase reference and a sine and cosine appear the same. If you have one sine and one cosine, then it depends upon which waveform you trigger from and the trigger level as to what is the reference point. The scope doesn't recognize the waveform. It's reference is simply whichever waveform you are triggering from.
The same holds true for 2 square waves.