Gathering turns the edge of a piece of fabric into a bunch of small folds that are held together by a thread close to the edge. Gathering makes the fabric shorter where it is stitched. The whole of the fabric pops into irregular, rolling folds beyond the gathered stitching. Gathering can be done by hand, with a machine, automatically, with elastic, or through channels. 
Pleating and shirring are two different types of gather sewing.
In simple gathering, parallel rows of running stitches are sewn along one edge of the fabric to be gathered. The stitching threads are then pulled or "drawn up" so that the fabric forms small folds along the threads. 
Gathering seams once involved tedious hand sewing of basting, which was time-consuming, especially with heavy fabric. However, finer gathers could be achieved. Now, a quick and easy way to make a gather is to use a wide zigzag stitch with a sewing machine. Both the upper and lower thread are pulled long and placed in front of the sewing machine. Then zigzagging is carefully sewed over top of the two threads without catching the threads as it is sewn. At the end the thread is pulled and is then gathered.