Again, almost everyone has this experience sooner or later. I really did get a big, fat D on one of my general chemistry exams. Could I have been working harder? Probably, but I certainly wasn't wasting my time... I was studying, and I'm sure you are, too.
Don't abandon hope.
So the big issue isn't the experience itself, but how you respond to it. You can brood over the situation as an unfair or inaccurate evaluation of your effort (which is what I did at first), or you can see it as a challenge to improve, even when at first you're not sure what needs to be improved. Let's start with the basics...
For the 'Homework' section of the exams, that's easy... all the questions are either identical to or minor variations of the book problems that were assigned in lecture. So, if you came to a question in that section of the exam that seemed completely new, that's telling you something.
Make sure you know where all the exam questions came from.
You shouldn't have any trouble finding the assigned problem(s) that a particular exam question was based on. Find them, so you can see concretely where all the exam questions are coming from. If you didn't do a particular assigned problem, well, that's easy to fix for next time. More often, though, you probably did do the assigned problem, so the bigger question is: why couldn't you do it on the exam?
That's the big question, and I'm afraid I don't have any general answers. (I wish I did!) But, be honest with yourself. When this happened to me, I realized that when I thought I was thinking through a homework problem, I was really just relying on my memory to imitate what I had seen done in lecture. I thought I understood it, but I was really just remembering. When the exam rolled around and the environment was a bit more stressful than my dorm room, I couldn't really think it through.
The experience taught me that I needed to be harder on myself when I was doing assigned problems from the book: did I really get it? Could I explain what I was doing to mom? I was surprised at how often the answer was no, which meant that I needed to either dig deeper into my notes or the text, or better yet, ask the instructor about it. Do not make the mistake of looking for quick fixes like YouTube videos or Google searches. You're paying a lot for one-on-one interactions with knowledgeable professors who have been down the road you're on; don't waste the opportunity.
In the 'Lecture' section of the exam, the questions either come straight from the lecture notes, or they really are homework questions that lend themselves to a multiple-choice format. Again, find the part of the notes that the exam question came from. If you can't find it in your notes, try the posted notes on the Blueline course site. It may be that your notes are not complete enough; that is a skill that comes with time and practice. (If you're not taking notes, that's another easy problem to fix.)
Honestly, in the beginning of my freshman general chemistry course I didn't take notes. I didn't do it much in high school, and it didn't seem necessary in college either. Well, it's necessary. Just the physical act of writing helps you participate in the lecture on a more than merely passive level, and it also engages you more as a person. But more important than taking the notes is what you do with the notes after you have them. I found that I needed to keep thinking through them in order to be ready for the next lecture. Ideas tend to build on previous ideas in general chemistry, and if you miss something, your inability to think things through can snowball in a hurry.
Obviously, anything that's presented in lecture is free game on an exam, and in a course like this you just can't fake it; either you understand an idea or you don't. So again, be honest with yourself: do you really get it or not? If not, I'm here to help you get it sorted out.
If you were short on time for the exam, that may be a sign that you were spending too much time trying to figure out the problem during the exam. While thinking through the problems is absolutely essential, the heavy lifting must be done before the exam. The exam itself is your opportunity to demonstrate that you have done exactly that: you're still thinking through the questions, but it's much more of a self-review than a figuring-it-out mentality.
Make sure you're doing your serious thinking before the exam.
As mentioned above, the vast majority of the 'Homework' problems are going to be very similar to the assigned book problems, so you've had time to think about them seriously and ask questions if need be. (Sure, there may be a problem on there that is meant to separate the As from the B+s and will give you something new to think about, but that will be the exception rather than the rule.)
You may have known perfectly well what to expect for exam questions and spent time thinking about them, but things still didn't go well. So what was it about how you approached the lecture notes and problems that didn't make your study time and effort fruitful? Again, I wish I had general answers. Only you can answer this one, and it'll probably take time and experience to answer it completely. (I was a sophomore before I figured out what I needed to do to really learn something.) To help you get started, I have a few suggestions posted here.
What could you have done before the exam to be ready for this question?
When you come up with a few ideas for how to change your approach, be sure to let me know how I can help.
Having said the above, there are some general things that aren't going to make or break you when it comes to exams, but they're worth mentioning. The following are examples of bad habits people fall into that make it very difficult for them to think through chemical problems.
Don't forget the fundamentals.
(1) They don't write down the units. It's hard to make silly mistakes if you write down the units and follow them through algebraically. It's easy to make silly mistakes if you don't write down the units or don't think about them.
(2) They check their common sense at the door. So you do a problem and you get an answer of –2 atm. Does it make sense to have a negative pressure? How about a negative temperature in kelvin? Or you have a reaction that produces 6.0 x 1024 kg of product, which is more than the mass of the earth? Even if you can't find your mistake, let me know that you know your answer is crazy! If for no other reason, you'll get more partial credit.
(3) They are sloppy. Sound, clear thinking almost always leads to neat, organized responses on exam papers. Incomplete, sloppy thinking almost always leads to disjointed, incoherent responses on exams. Neatness is not an irrelevant, superficial thing; truth and beauty are deeply related.
Always remember: I'm not a machine grading your exams. It's not like I'm looking for certain specific things that get assigned a certain number of points. I'm reading your paper, one human being to another, and trying to figure out how much chemistry you know based on what you're communicating to me, both in words and mathematics.
Based on what you learned from the above examination of conscience, you should now be ready to better prepare for the next exam. In addition to the plan of attack you've made for yourself, don't forget to use the resources available: the Main Equations and Ideas sheets given out for each exam can be a great way to organize and prioritize your studies; there are a number of specific study suggestions here, along with a suggested weekly timeline.
Get ready for the next one.
But maybe the biggest thing to focus on is this: don't just do the assigned problems, really think about them: do you really understand all the steps, or are you doing what I used to do... just going through the motions? It's shockingly easy to do this without realizing that you're doing it, so be honest with yourself!
For example, after you've finished a particular problem, ask yourself: why did they ask this question? I assure you, it is not because they're interested in the specific answer to that specific question... no one cares! Questions are asked to give you an opportunity to think in more detail about a particular chemical idea. What was it? How does the problem clarify the idea? What's the point?! Sometimes the answer to this isn't obvious, which is why they pay me to help you.
You've probably heard people say that you never really learn something until you have to explain it to someone else. In my experience, that is very true. So, when you've finished a problem, imagine how you would explain it to a bright, inquisitive third party. They'll have questions (e.g., what's the point? who cares?) anticipate them and make sure you have a good answer.
And again: they pay me to help you, but I can't do that if you don't ask. I've got lots of office hours... stop by and see me!
One last thing: when you come in to ask questions, my first instinct is to try and bring out the underlying simplicity in the problem or idea. Now, don't get me wrong: it's chemistry. It's hard. It was a struggle for me to learn it just as much as you or most anyone else. But after you've had some time to think about things (and I've had close to 30 years now), you realize that everything really does boil down to simple ideas. The hard part is that it can take a lot of work to mentally peel off the layers and find the underlying clarity. I think that's why it is my first impulse: I'm eager to share the fruit of my own hard work and frustration.
So when you come in with a question that's driving you nuts and you can't figure out, and I smile and say something straightforward and obvious that you think makes your question seem stupid, embrace it! That's humility. Obviously I'm not trying to make your question seem dumb, I'm just focused on pointing out the simplicity. I can't tell you the number of times I've felt like a complete moron asking a question that, in hindsight, seemed to have an obvious answer. It still happens to me regularly. Pride would have us brood over the experience, but humility is the antidote.