Drills generally use nickel-cadmium rechargeable batteries. The type of work you do with the drill determines the period you can operate the drill without recharging. Over time, that period will become shorter and eventually the battery will wear out and need replacing. It's the nature of the technology. However, just because the battery won't take a charge, it doesn't mean the battery has reached the end of its life. You can potentially give the battery a little extra life by reconditioning it.
Attach the battery pack and use the drill. Allow the drill to operate until the battery is empty. Don't place the battery pack into the charger until the battery is completely discharged.
Place the battery pack in the charger and allow the battery to charge for the recommended charge time, usually overnight.
Use the drill again. Run the battery pack until it is exhausted. Again, don't try to recharge the battery until the drill's battery is fully exhausted. If you have a tool combo kit---that's where a flashlight, saw and other tools use the same battery---attached the battery pack to the flashlight and run the battery down fully.
Repeat this a few times. Each time, run the battery down fully and charge fully. You should start to see an improvement in the length of time the battery holds its charge. This fix is due to a thing called "memory effect." Under normal use the battery "forgets" that it can take a full charge. By performing these steps you are reminding it that it can.
Try the battery again. If the battery still isn't holding a charge, it has reached the end of its life and should be properly recycled.
Always take the battery out of its charger when it's charged. Store nickel-cadmium batteries over 30 days discharged. Store batteries under 26.7 degrees C.