So if you want to knit a scarf the first thing you're going to have to do is cast on.
Your pattern is going to tell you which kind of cast on to use. There are lots of different kinds but tips sort of across the board are keeping your yarn nice and loose. You don't want to see daylight through your stitches but you don't want to be choking the needle either. Remember whatever you put on during your cast on you're going to have to knit back into on your first row.
Also I would sample your cast on before you start your actual project. Maybe choose the type of cast on you're going to use and practice with some scrap yarn or with the yarn that's going to be with your project and make sure you can get the tension right on your cast on. Maybe sample different kinds of cast ons and then knit a few inches to see what the edges look like with your tension.
Finally, remember that even if the tension isn't perfect in your cast on, even if there are some looser ones or some tighter ones you're going to be knitting into that and it's going to be at the bottom of your scarf anyway so don't take it too seriously.
Those are some tips for casting on for your scarf.