Hats are fun :D It'll seem like a lot of things to learn at first, but once you get the hang of it, it shouldn't be that bad.
Gauge is a way of making sure the items will be the right size. It's not as important for scarves, but for hats (or sweaters or gloves or whatever), it can be important -- the pattern is designed for a certain number of stitches per inch, and a certain size; if you have a lot more stitches per inch, the hat will end up way too small, and if you have a lot fewer stitches per inch, the hat will end up more like a boat.
So usually they'll give some information on the gauge -- for example, "28 sts and 40 rows = 4" [10 cm] in stockinette" -- and so you want to cast on 28 stitches and knit for a while and measure to make sure it's right. You can adjust the number of stitches based on the tension you're knitting with, or the size of needles you're using. The stitches per inch is more important than the rows per inch, since a lot of patterns will just say "knit for 4" " or whatever.
K2 just means to knit two stitches; P2 is the equivalent but with purling. There may be other abbreviations depending on the pattern; they'll usually define them, but you can always ask here for help