To create ribbing in your work you will combine knit and purl stitches in 'columns'.
Ribbing can be and number of combinations of knit and purl stitches. For instance, 1 by 1 Ribbing combines 1 knit stitch and 1 purl stitch. 2 by 2 Ribbing combines 2 knit stitches with two purl stitches.
So for 2 by 2 Ribbing it would look like this in the pattern:
Row 1 (RS): *K2, p2; rep to end.
Row 2 (WS): *K2, p2; rep to end.
See it in a video here: