The biggest killers of Lithium-Ion batteries (the type of battery most modern laptops use) are time and temperature. You only have control over one of those though.
Charging a battery means that electricity is flowing into it and since current flow generates heat, charging it will eventually kill it. However, current also flows through it when you are running on battery power, so using it while unplugged also kills it. In fact, unplugging it while in use may kill it sooner since the charging circuitry pretty much cuts off electricity to the battery when it is full, so a plugged in laptop either puts less current through the battery while plugged in thus prolonging battery life due to lessened draw or doesn’t make a damn bit of difference. That said, you should unplug it when not in use unless the battery is nearly dead.
Temperature also has a HUGE effect on the life of LiON batteries. See this chart for details. Since laptop batteries can get rather warm they are often near the CPU, or at least close enough to catch some residual heat, you may consider using your laptop while sitting in a walk-in refrigerator.
Storing it fully charged when not in use wil also kill it; see the chart I linked above.
As for lasting longer on a single charge, there are four big drains.
1) Backlight – Ther eis a reason that MP3 players get 20–30 hours of music play but only 4–6 hours of video playback. My cellphone can last 2–3 days between charges if I set the backlight to shut off after 15 second of inactivity but less than 18 hours if the backlight is always on. Dimming the backlight on a laptop can get you quite a gain.
2) Wifi – If you are not online, turn off the wireless. I could get my battery life to jump by about 15% or more right there.
3) Hard drive – Spin that down whenever it isn’t in use. I can tell when my T135 spins the drive down because my estimated time to discharge jumps from about 5 hours to nearly 8.
4) Optical drive – CD/DVD playback eats batteries alive. I can get over 8 hours with the hard drive spun down and wifi on, but video playback from an optical drive will bring it under 3 hours.