Gauge is the tension you knit at, how many stitches per inch (or 4") you get with a needle and yarn. Pattern have a gauge that would try to match using whatever needle you need to; if you do then you can pick a size and the item would more than likely fit you. It's not as important for scarves and shawls as they don't have to fit, but if there's a very large difference in gauge then they'll turn out a different size.
Yarn labels have a gauge on them, but that's more to classify them into a weight category - sock, dk, worsted or bulky for example - than the gauge you should get or for substituting similar yarns. Patterns will often have a different gauge and needle size and that's the one you would follow.
Here's a few articles on gauge --