You didn't mention a brand, but the information is readily transferable to other makes/models of laptop: Apple's guide to caring for the batteries in their laptops (MacBook, MacBook Pro) -- <http://support.apple.com/kb/HT1490>
Basically, as others have said, you want to periodically (at least once a month) let the battery drain down until the computer shuts off and then either remove the battery and run off wall/AC power or set the computer aside (turned off entirely) for 5 hours (per Apple's recommendations; it may vary by battery capacity/chemistry as to how long to let it "rest".) After that, charge it up to full power and you can use it as usual, plugged in to wall/AC power if desired once fully charged.
More info (from Apple, but same should apply for other models) about laptop lithium ion batteries) --
The **Related Questions** section (for once) has some good additional *Lockergnome.net* threads you should check out...