A darning foot is an attachment for your sewing machine. It can be made from plastic or metal. Usually a small square or circle is at the base of this foot. The size of the opening varies.
Aside from mending socks, a darning foot is used for free-motion quilting.
How does this foot work? When using a darning foot, your feed dogs must be put out of commission. (On some machines they are lowered and on other machines a plate covers the feed dogs – consult your manual.) Because the feed dogs are no longer working, there is no machine control for the stitch length. Your hand moving the fabric and the speed of your machine will now determine stitch length. To keep stitching consistent while using a darning foot requires practice.
Below is a darning foot for a Bernina sewing machine. It is metal and has a partial open circle at the bottom of the foot.