Pilling occurs when fibres of the fabric break, get tangled together, and wind up in little knotted balls along the surface of the garment. Pilling makes the garment look less attractive, and can affect the feel and comfort of it as well. Regardless of the quality of your sweater, some pilling will eventually occur, but the lower the quality of the garment – and the lower the degree of care taken when wearing and/or washing it – the more pilling will occur.
The best way to avoid pilling starts by buying a quality garment, but after that, the way you clean it is probably the most important factor. Turn the garment inside out when washing it and, if you use a machine, use the gentlest cycle – hand-wash mode if your machine has one. Make sure to dry the garment flat on a table or similar surface, never hanging or out of shape. If it comes out of the washer a bit misshapen, simply stretch and bunch it into its proper shape on the flat surface before drying.
Regularly brushing with a garment (lint) brush will help reduce pilling, as will carefully removing them when they do occur. You can remove pills using a pair of small scissors or a razor blade, but be very careful not to cut any of the fibres of the sweater itself. Gently lift the pill until you can see the fibres that are in the pill and still attached to the garment, and carefully cut them next to the pill until it comes free. There are specialist tools for this job too, like electric fabric shavers and special combs.