converting to animation sequence

I have a box set to rotate around the z axies when i press p to run it it rotates just fine. How can I convert this to an animation frame by frame? help please!