It depends on what your problem is. If you are (like most people) a procrastinator, try to start your homework immediately after getting home from school. This is tiring after along day but I find that if I start something interesting, I won't get off of it until it is to late to finish the work. If you aren't doing well on tests maybe you need to study. If you are then it could be how long you are studying or how much you are really paying attention to what you are going over. But if you really are doing everything you can and are still getting bad grades, then it is probably how you are studying. Try reading the chapter in your textbook, making flash cards, doing example problems (for math), watching YouTube videos that enforce the material (Crash Course is really helpful), or having conversations with friends or family about what you are learning. Just try to find what helps you and stick with it.
Pay attention in class. Take notes. If you're having trouble with something, ask your teacher for help--it's what they're paid for and why they're there. So make use of the resource which stands at the front of the classroom every day!