What should I do as a TA if the instructor is not teaching properly?
I'd bet that the grad student teaching the course knows very well that his or her teaching competences are lacking, and that the students struggle to follow. After all, even if this person has little experience teaching, he or she has a lot of experience being a student, and is thus likely to recognize poor teaching, but unable to do something about it.
But alas, such is life sometimes. The grad student cannot suddenly, by magic, become a teacher with 20+ years of experience. Nor should they be expected to. The department, who already made the decision of putting an untried grad student in charge of a course, is also unlikely to suddenly allocate more resources.
It would be perfectly fine if you did nothing. Nothing is expected of you, you will not be paid for doing more than you are asked, and if you just do it, no one will thank you.
If you feel compelled to do something anyway, here's a suggestion. Go to the grad student and say that it is your impression that the students struggle way more with the material than last time you TAed the course, and ask if there is anything you can do. Prepare a couple of suggestions, stuff that you know could be improved by going over it a couple of times more in lectures. Don't pass any blame, but try to be as constructive as possible.
You don't say who you are, but if the course instructor is a second year grad student and you're the TA, I'm guessing you're an undergraduate at the university. I will assume so, and thus that you are academically junior to the instructor. (By the way, the person who teaches the course is called the "instructor." The instructor need not be a "professor" and a grad student cannot be a "professor" at a major American university. Your fogginess about this also makes me think you're an undergrad, in which case it is both common and forgivable.)
The course instructor is the one who is primarily responsible for the course, not you as the TA. If you want to help more, you can help more, but I would advise you to think of it in that way rather than as pushing back against the instructor. Here are some things you can do:
1) Encourage the students to talk to the instructor more, especially about their concerns in the course.
You're holding office hours, but so should the instructor be as well. It sounds like the students are more comfortable coming to you than the instructor. Half of that is fine -- i.e., they can and should come to your office hours if that's part of your job and especially if you're doing it well -- but they should also be going to the instructor. It's not just for them to get extra help from him: by seeing the students in person and listening to their questions, the instructor gets key feedback about how the course is going.
If, as I'm assuming, you and the students are all undergraduates, they are much more likely to want to talk to a fellow undergraduate, and they may even be much more direct in conveying their concerns to you. Every time a student expresses a concern (or makes a complaint), I would be clear with them that it is up to them to register this concern with the instructor, ideally during the course but certainly during the course evaluations. (If the instructor is really unresponsive they could go higher, but if they want help with that they should get it from someone higher up in the food chain, not a fellow undergraduate.) The TA is not an ombudsperson.
2) If your office hours are going well, you can promote them to the students.
Do your best to make sure that every student knows about your office hours and that many of the students find them helpful. And then of course really try to be helpful during your office hours. If you want to do a bit more, here is the most natural opportunity to do so: you could try preparing small amounts of course material and presenting them to students in your office hours. If a student cannot make your office hours, you could (if you want) make a point to meet with them outside of the regularly scheduled office hours. And so forth. But understand that if you go over and beyond the call of TA duties, your rewards will probably consist of student gratitude and an internal sense of accomplishment. You are probably not going to get paid more or formally recognized.
3) You can try to talk to the instructor about the course, but this is a rather advanced technique, and should be done only if you are confident it can be done non-adversarially.
As I mentioned above, it is not your place to criticize the instructor. However, if you gain information about the students and how they are learning, you can bring that to the instructor. So e.g. if students did very badly on part of a problem set, the instructor will probably appreciate your pointing it out. If you think you know why they did badly, you may want to take a shot at explaining why, but think in advance of a way to explain it that comes out in terms of the opportunity for things to be going better for the students, not in terms of telling the instructor what s/he did wrong.
Finally:
4) Understand that it's probably okay if the course is not being taught as well as it could be. However, if it is being taught truly inadequately -- e.g., if you have good reason to believe there will be many student complaints by the end of the semester -- then I suggest you convey this opinion to a friendly faculty member, e.g. your academic advisor.
Some courses go better than others, and some teachers are better than others -- sometimes much better. It is not always the case that the veteran professor is a better teacher than the first time grad student instructor, but the good veteran professor is going to be so much better than the not good first time grad student instructor that it's going to seem painful for you to compare the two courses. But keep in mind that the students are not comparing those two courses; they're just getting the one. (And there are a lot of other degrees of good and bad in courses that you don't know about.) Maybe the department is pushing grad students into teaching courses too early. (But maybe not: in fact, as a second year grad student at a major university on the east coast, I was the instructor of record for a course. I did a good job -- as the evaluations lay, about as good a job as I ever did in the 8-10 more times I've taught the course since then.) Maybe they are letting first time instructors hang in the wind too much. Maybe this particular student is a particularly bad teacher, or maybe he is a generally unhappy grad student and punching time in his last semester in the program. There are so many maybes, and most or all of them are well above your pay grade. There are faculty in the department whose problem this is. If the teaching seems really really bad, then you might try to figure out how to convey that message to the relevant faculty members, and I think you will have more than done your part by conveying your concerns to any faculty member in the department.
If it came to your attention that students have major issues with the professor, then I think it is better for everybody to talk with the prof. and let him know the problems the students are facing.
You should also ask the students to tell you concrete problems related to the course so that you can transfer concrete complains to the professor. You are not obliged to do so, but this is something that will benefit everyone, especially the students.
There is a good chance that the new prof. (who is a grad student) doesn't care at all (maybe s/he was even forced to teach the course against his will). But still, he should be aware about the major complaints the students have and then it will be up to her/him to fix the situation.