I'm new. I created this simple scene, but I can not render it. Rendering happens, but the flag stands still. What am I doing wrong? P.S. I`m trying to use Cycles Render. Here is link to my "project": https://www.dropbox.com/s/svxa7va3dd54s74/untitled.blend?dl=0
Select your flag object and fix the modifiers order by moving the cloth modifier to the top. Then you go to the Physics tab, press "Free All Bakes" and "Bake All Dynamics" (at Cloth Cache section). After the baking finishes you should be able to render the animation.
From Blender documentation (emphasis mine):
Once the object is designated as Cloth, a Cloth modifier will be added to the object’s modifier stack automatically. As a modifier then, it can interact with other modifiers, such as Armature and Smooth. In these cases, the ultimate shape of the mesh is computed in accordance with the order of the modifier stack. For example, you should smooth the cloth after the modifier computes the shape of the cloth.