Visual Beats Applet - Sum of Red and Green waves

Adjust the freqencies of the Red and Green Waves.  The sum of those waves is the yellow wave.  Why does the yellow wave get larger and smaller?  What happens when the red and green waves are set to the same frequency?