So you're in the middle of History 2112 and are typing notes like crazy because your professor talks a million words per minute. Unfortunately for you there are 30 minutes left in class but your PowerBook only has 15 minutes of juice left. What to do? The first one should be obvious - lowering the brightness on your screen. This can save major battery life. Disabling AirPort wireless and BlueTooth are also big helpers.
Make your way over to System Preferences » Energy Saver » Settings for » Battery and Optimization > Better Battery Life. You are only going to want to have that enabled when you're using the battery, as it throttles the CPU.
The second line of action is to keep your CPU happy and not run too much stuff. That includes extraneous widgets, iTunes, QuickSilver and all the stuff you have running in the dock; basically anything that doesn't help with TextEdit or whatever isn't necessary for the task at hand. You can double check to see if you have any applications running hidden in the background by accessing Applications » Utilities » Activity Monitor. It will give you a list of running processes and some basic info such as how much memory they are taking up. If you track down any processes you don't deem as vital for what you're doing, click Quit Process.
Your last line of defense is inverting the screen's colors. By pressing Control + Option + Apple + 8 the colors on your screen will invert. This way, the primary colors on your screen will be darker. On an LCD, black is the rest state for each pixel, so your computer wouldn't have to put forth nearly as much electricity for the display. Following even a few of these tips should help your Mac laptop hold out through the end of that class.