Hi and welcome to Knitting Help!
You were knitting a hat joined in the round on the circular needle and then switched to dpns to continue knitting in the round? Or were you knitting back and forth (knitting flat) in stockinette and then changed to dpns to join and knit in the round?
When you knit flat, stockinette is knit one row, purl one row. If you're knitting joined so that you knit a tube (knitting in the round), knitting one round and purling one round will give you garter stitch. If you want stockinette in the round, you need to knit every round.