Square or Sinewave

The square wave should be easy, but the sine wave will not be easy.
Though i don't know how easy it will be for the arduino to switch on a pin and off 1,200,000 times a second...