These tips will help your MacBook battery last through the entire school day:
Charge your battery completely at night. Make a habit to plug in your computer before bed and put it in your bag to bring to school, fully charged in the morning.
Restart your computer every once in a while. Pick a day, maybe Monday or Friday, to always restart it before you start working.
When you're not actively using your computer in class, close the lid. This will put it to sleep and save the battery. It will also help you concentrate better on the lesson.
Dim your screen's brightness by using the F1 key on your keyboard. Don't dim it so much that your eyes strain, but experiment with the brightness and find a dim setting that doesn't hurt your eyes.
Turn off bluetooth if you don't need it. This setting is in System Preferences - Bluetooth.
Shut down any apps that you aren't using. Read this article to learn several different ways to do this.
In System Preferences - Energy Saver: Adjust the slider to be as far to the left as you can stand it to be. Also, make sure that the boxes for "Put hard disks to sleep" and "Slightly dim the display on battery power" are both checked.
Close unused browser tabs or windows in Safari or Firefox. You can always get them back later by going to the history menu.
If you have things connected to your computer via USB, or if you have an SD card in the slot, remove them when you're not using them. They will draw power from your battery.
You can find out which applications are using a significant amount energy by clicking on the battery icon in the menu bar. Consider quitting any apps that are listed here if you don't need them open
Lower the light on your keyboard by using the F5 key on your keyboard.
And if all else fails...