Let's say you cast on 20 stitches. You knit the rows back and forth, and as you do it, you'll find a strip of "fabric" growing. The more rows you knit, the longer your strip. If you keep going long enough, you'll have a scarf. If you had cast on more stitches, your strip would be wider, and if you cast on fewer sts, it will be more narrow.
That's your basic rectangle. You can make many things out of some rectangles. If you make 2 big squares and 2 long rectangles, you can sew them together to make a sweater: the squares will be your back and front, and the 2 rectangles folded over the long way will make sleeves.
But there are also things that need more shaping-- and your 4-rectangle sweater will need a little bit of shaping at the neck, too. This is done by adding or taking away stitches, which is called increasing and decreasing. You can also do things like, instead of finishing a row, you stop in the middle of it and turn back. These are called short rows and are how you make the curved heel of a sock.
You can also knit things "in the round" on circular or double pointed needles, which creates tubes, big ones like the body of a sweater, or little ones, like socks.
Knitting is like sewing, except instead of cutting the pieces out of cloth, you're actually making the fabric yourself and shaping it as you go, stitch by stitch.