By and large, you can't use someone's pattern to knit an item and then sell it for profit.
However, most patterns (free or otherwise) will have a 'statement' about the use of the design for profit, and other uses.
You COULD use a knitting software program to design your own garments for sale. Get a good knitting stitches "bible" to get some ideas about the pattern stitch you want to use; get the yarn lined up; knit a swatch that suits the yarn and pattern stitch; and then enter that data into a knitting software program! You could sell any garment using that method!