All batteries have some qualities in common: they contain material that can hold and create an electrical charge, usually through a chemical reaction. Out of all the different types of batteries, there are two main types that the consumer usually deals with; rechargeable and disposable.
Disposable batteries commonly come in three types: alkaline (the most common), heavy-duty (also called carbon zinc batteries) and lithium (not to be confused with lithium-ion rechargeable batteries). Alkaline are the common batteries that fill the need for most uses, and are the workhorse of the disposable batteries with a good lifespan and price. Heavy-duty batteries are generally cheaper than alkaline, and with a shorter lifespan, are better suited for simple devices that are not used as often, such as flashlights. Lithium batteries have a very long lifespan, but are very costly and contain toxic material. These are generally best suited for devices that require a much longer lifespan (such as smoke detectors, where they can last around 7-10 years) or in devices that will have long exposure to sub-zero temperatures...think about those cabins in the arctic circle. Don't have one of those? No need to worry about lithium batteries, then.
There have been many changes in rechargeable batteries over the years, and there are still many different types out on the market. They are generally going to be more expensive than disposable batteries and will require a charging device. All rechargeables will deteriorate over time, and will eventually need disposing of, but with ability to recharge them once they are 'spent', increases the lifetime of these batteries over their disposable counterparts, and is a good economical choice in the long run. NiCad (nickel-cadmium) were really the first rechargeable battery to be widely available and popular to consumers, but it had notorious for having short charge life and not having the overall power of a disposable. They are also toxic, so ultimately disposing of them is a problem. They are still popular for commercial applications, such as professional photography, where their high charge density makes them popular. Rechargeable alkaline were supposed to combine the best of both worlds, having the power and battery life of a disposable along with the cost-saving recharging capability of other rechargeable batteries. They really fall behind on both counts, but their low-cost has still given them a niche in the market. Most popular in the consumer rechargeable batter market is the nickel-metal hydride (NiMH) battery. This type have a higher energy density have NiCad's, hold a charge for longer, and will generally have a longer lifespan of recharging cycles. The downside, as with most rechargeables, is that it with subsequent recharges, they tend hold less and less capacity than before. This means the more times the battery gets recharged, the less charge it holds and the sooner it will need to be recharged. Lithium-ion batteries come in a wide range of chemical makeups, but have some similarities. All use lithium (the lightest metal) in their chemistry, and all have superior charging and energy density, but will generally not have the compact size and shape available in NiMh batteries. That makes them ideal for applications such as power tools, but not so much for smaller devices, such as cell phones, where NiMh are generally used.
Care and useage...so we've got batteries, now what? For both types, disposable and rechargeable, they should be removed from devices if they are not going to be used long-term or put into storage. Also, you should never,under any circumstances, attempt to recharge alkaline or heavy duty batteries, or attempt to recharge a battery on a charger not meant for that battery. Nearly every battery contains caustic, corrosive and toxic material, and can release flamable gasses that only need a spark to ignite, when not used properly...flamable gas + corrosive chemicals = not a good thing!
As for rechargeables, a few simple things to remember can extend the life of your battery and help you avoid being out of juice when you need it. With a new rechargeable, most experts agree that it's a good idea to initially charge it fully (as most of these are empty of charge when brand new) and be sure to fully discharge it before recharging again. This should be repeated for the first three or four uses. This helps set the full capacity point of the battery. Additionally, fully discharging the battery and then recharging to capacity every three to four weeks, depending on usage, will help keep it's maximum capacity point (also refered to as a zero-point or memory point). Lithium-ion batteries are more stable for keeping their original zero-point, but it is still a good idea to prolong the life of the battery through occasional full discharging and recharging.
With all batteries, eventually they are going to be past their usage, whether it's disposables that are spent, or rechargeables that are no longer holding a charge, and it's very important that no matter the type of battery, it is disposed of properly. As stated above, most disposables contain toxic and caustic material that can cause damage if just thrown with regular waste or, even worse, incinerated, so special care is needed to properly dispose of them. Lithium-ion and NiMH can be dropped off at recycling centers and reconditioned for reuse, another great selling point to go with these...go green!