Baby hat

i have a quick question can i use baby sport yarn for a hat

Yes you can use any type of yarn for a hat with the right needles for the yarn and the right number of sts for the size. This basic hat recipewill help you.

question i am trying this pattern General Directions.
Cast on 54 sts. Work in Kl-Pl ribbing for 16 rows. approx. 2inches.
Change to Stockinette stitch.
Kl row Pl row.and knit for 24 rows.
Decrease Rows.
Row1-- Knit 3 knit 2 together across
Row2–Purl 2 Purl 2 together across
Row 3 -Knit 1 Knit 2 together across
row 4–Knit 2 together across.
Cut a long length of yarn for sewing. Gather remaining sts and sew securely
Continue to sew back seam.
Add pompom or bow if desired.
there is the pattern above but i dont understand kl row pl row and knit for 24 row please help me

The hat pattern you shared is worked flat and after you work the ribbing it says:

Change to Stockinette stitch.
Kl row Pl row.and knit for 24 rows.
K1 row P1 row is explaining how you do Stockinette stitch. You alternate knit rows with purl rows so that all the smooth part is on one side and the bumps on the other. You are to work that way: knit and row, purl a row for 24 rows.

If you want to make a baby hat with sport weight yarn I think you will want more stitches than this pattern gives. And probably the row gauge will be different, so you would need to work more rows than 24 to make it the length it needs to before the decreases.

The “basic hat recipe” that Sue pointed you do might be your best bet.

That’s a 1, not an ‘l’. You’re knitting flat for this pattern not in the round, and you knit a row then purl a row to make stockinette stitch. The ‘knit 24 rows’ means to do 24 rows in stockinette st, knitting and purling alternate rows.