How do I get the Play button to work?

This is my first time using Unity, I have created a 3D cube and put a spin script to it so it rotates in place. I went and clicked on the play button to see how it would work but on pressing the play button, nothing happens, no error message or nothing. What am I doing wrong? Please help.

You are totally misconstrued as to what is supposed to happen there.

Pressing play in your Animation import Previewer is not indication of what will happen when you click the Game Play button. You must set up the animation components to utilise the animation clips. They dont just apply automatically.

Your play mode is fully functional and not broken at all.

The “Game” window is the actual game preview.

https://unity3d.com/learn/tutorials/modules/beginner/animation/animator-scripting

https://www.google.co.uk/search?q=unity+seting+up+animator&ie=utf-8&oe=utf-8&client=ubuntu&channel=fs&gfe_rd=cr&ei=qowGV9HkFMiEaL6cpKgD&gws_rd=ssl#channel=fs&q=unity+setting+up+animator

create one script : name it ExampleClass and write following code now save it,now go to unity and select cube and now drag that script on inspector so it attach to cube and than press play button of unity it works:

using UnityEngine;

public class ExampleClass : MonoBehaviour
{

void Update() 
{
    // Rotate the object around its local Y axis at 1 degree per second
    transform.Rotate(Vector3.right * Time.deltaTime*10);

}

}