Howdy!
2x2 rib is ribbing done by knitting 2 then purling 2 stitches (then on the reverse side you do the opposite) and that’s how you get that ribbed effect like you see on the cuffs of sweaters, hats, etc.
You get “guage” by knitting a swatch slightly larger than 4 inches using the recommended needle size… you then get a measuring tape or a knitter’s guage ruler and count how many rows up and down and how many stitches across you get per inch or per 4 inches. Then, if you count that you have more or less than what the ball of yarn recommends, you adjust your needle size, and sometimes your tension. I believe most people swatch in stockinette but you may want to refer to your pattern, some patterns say to swatch a section of the pattern stitch (in rib, garter, seed, whichever) to more accurately determine your guage for that particular design.
Hope that helps!