Pinning a fabric is very important for beginners trying their hand at sewing. Even the experts pin the fabric before they sew. Pinning keeps the cloth in place making sewing so much easier. This is how to pin a fabric.
Place wrong sides of the fabric together.
Now use pins in an in- out way. The tip of the needle first goes into the fabric and then comes out. Pin in a straight line perpendicular to the edge of the fabric. The pin head must be outside the fabric.
Now sew alongside the pins, removing them one by one as you proceed.