Don't Freak Out
My general motto is the first exam doesn't really count. It's hard to know exactly what to expect on the first test. Each teacher is different in what they test you on - some focus on details, some overarching concepts. Plus, there's always some nerves for that first test of the semester.
If you fail the first test of the semester, it's usually fairly easy to raise your grade by using that first test as a learning experience. Now that you've taken the exam, you know what the teacher will be testing you on. Use that to your advantage by specifically looking for that information when taking notes. After the first quiz in my history class, I found out that my teacher focuses on how events effected people and changed society in general. So now when taking notes, I'm noting how the events changed people's lives rather than what the details of the event.
Talk to Your Teacher
Going in to teacher's office hours can be intimidating, especially after getting a bad grade, but there's a LOT of good that can come from visiting your teacher! Often times you can go over your exam with the teacher and together you can figure out if there's a certain thing that tripped you up on the exam (details? steps in processes? definitions?). You can also ask your teacher for study advice, tips on note-taking in their class (or for the textbook), and any other questions you might have. This also lets your teacher know that you take the class seriously and are willing to work to improve your grade.
If you're struggling to understand the material for a class, you can visit your teacher to go over (specific) concepts or questions you have. Teachers would much rather you do this than do poorly in their class. I've had teachers I visit about once a week to help me with homework problems and such. I got to know my teacher a lot better and visiting a teacher one-on-one allows them to teach you at a slower pace than they do in class.
Go to Class and Participate
First of all, GO TO CLASS. How are you going to get the information if you aren't in class? Even missing a class here or there can effect your grade. I know skipping a class is really tempting, but you're paying for it and probably need to pass it to graduate.
Classes are also much more interesting if you participate. When you get to class, put your phone away and pull out a notebook and pen. Taking notes by hand helps you remember better than typing notes and it gets rid of the very tempting distraction known as the internet.
Another important part of participating in class is speaking up - answer the teacher's questions and don't be afraid to ask for her to repeat or explain something. Getting that clarification right away will help you to understand the material when you go back and study!
If you're not studying, you're not going to pass. Start studying at least a week before the exam. If you study for 30 minutes a day for a week, you'll be able to cover all of the information, visit the teacher if you need to, and you might even be able to study your notes twice! So much better than cramming the night before, frantically emailing your teacher 15 questions, and running on 2 hours of sleep.
As I've said earlier, know what to study. While you probably should read over all your notes, you don't need to know every single word you wrote down verbatim. After your first test write down what kind of questions made up the test and keep it in your class folder or notebook for later. Incase you're not sure what I'm talking about, ask yourself questions like... Was your test mostly dates, events, important people, or effects? If you're in a literature class, does the teacher focus mainly on characters, overarching themes, or analysis of the story? In a science class they might focus mainly on steps in a process or functions of processes or concepts. Once you know what to study, studying and note-taking become so much easier.
Besides studying early and knowing what to study, you also have to know how you study. There's lots of ways to study, and often times it depends on your learning style (you can find yours with this quick test). Some ways I study: flashcards, practice tests, rewriting notes, creating condensed notes, drawing out processes, and finding a friend in class to study with.
I know this post is super long, but I wanted to give you guys helpful advice! These are the tips I give my friends when they're having troubles in a class, so I hope it helped you figure out what your next steps are if you're struggling.
Related Post: Tips for Getting Homework Done, 3 Ways to Study, What It Means to be Prepared for Class