I have a problem. I'm kind of new to blender. I'm trying to simulate a curtain and everything works well except when I scale the pinning points in order to get the "waves". Could someone please help me? I would be really grateful!
When running a cloth simulation, Blender uses the state of the mesh at the start of the simulation to determine the properties of the cloth - in particular, the size and dimensions of the individual faces. It appears that in your example that you have scaled a set of vertices while in Edit mode and this has affected the dimensions of the cloth itself, rather than just moving those vertices as intended.
In order to resolve this you need to know a little about how the cloth simulation operates. Firstly, the 'base' state of the mesh determines the underlying geometry of the cloth - ie, the vertices of the cloth and the length of any edges connecting those vertices. Once the simulation is started, Blender effectively makes a copy of the entire mesh and moves the location of that copy's vertices based on the simulation - but, importantly, Blender will use the 'actual' mesh edges to limit how far neighbouring vertices can move away from each other - ie, the 'structure' of the cloth. In addition to just the 'distance' between the vertices. Settings in the cloth simulation allow the 'stiffness' of this structure to be set, allowing the cloth to retain it's original shape.
When you 'pin' vertices, you are effectively tying those vertices to the corresponding vertices in the original mesh (rather than the 'copy' that follows the simulation). When you manipulate the original mesh, any 'pinned' vertices will follow where the 'actual' vertex moves. This allows the original mesh to be manipulated to effectively 'drag' the simulated mesh to affect the simulation.
So, to achieve the effect you are looking for, first create the mesh in a form that mimics the actual structure of the cloth - in this case, the curtain is a simple subdivided plane - more subdivisions gives more resolution to the cloth :
Select some of the vertices to be 'pinned' - ie, the points where it would be attached to a curtain rail or whatever. Assign those vertices to a vertex group with an appropriate name - eg, 'Pin' :
Setup your cloth properties with Pinning enabled, specifying your new 'Pin' vertex group.
Now, simply add a keyframe at the start of the animation to set the scale of the entire mesh to 1.0 and add a second keyframe to reduce the scale of the mesh (in the appropriate dimension - in my case this was in the Y-axis only). Since only the pinned vertices affect the simulation it is not necessary to limit the scaling to only the pinned vertices.
This produces the following result :