When you alternate a knit stitch and a purl stitch, this is called a single rib or k1p1 rib. This is the most basic rib stitch in knitting and it gives a very elastic rib that is good for many applications, often at the cuffs and hems and on hat brims.