A knitted rib is a stitch pattern combining knits and purls to make vertical stripes of each stitch. The most common ribs are 1 x 1 and 2 x 2, but there are dozens of variations.
Ribs are most commonly used as edges, hems, brims, and cuffs since they are some of the stretchiest stitches.
FORWARD AND BACKWARD
This is the only trick to knitting ribs. Every time you switch between a knit stitch and a purl stitch, you must first bring your yarn to the front or back of your work.
When you knit, the yarn is in the back, so to switch from knitting to purling, you need to bring the yarn to the front before you purl. Likewise, to switch from purling to knitting, you need to bring the yarn to the back before you knit.
The first three videos below are showing us knitting 1 x 1 ribs, bringing the yarn forward and backward as we switch between knits and purls.
Note that for the first stitch of a row, the yarn won't seem like it's in front or behind, it will just be to the side. Whether you grab that yarn from the front or the back when you start the row depends on whether your first stitch is a knit or a purl.
If you haven't already, familiarize yourself with the different styles of knitting before continuing. There are three different ways to hold your yarn when knitting and you want to make sure you're watching the right technique for you.
1 x 1 RIBS
BRING YARN FORWARD
BRING YARN BACKWARD