Charging batteries isn't as simple as you might first think.
NiCd and NiMh require a constant current source for charging. The amount of current you will require depends on a) the capacity of the batteries, and b) how fast you want to charge them.
Batteries have a value called "C". This is the capacity of the battery, and is the current it will provide when it goes from full charge to "flat" in one hour. For a 2500mAh battery this is 2500mA. Quite simple.
Charging the batteries requires a fraction of that current for a longer period. Charge too fast and the batteries will explode. Charge too slow and they just won't charge up at all.
The longest, and safest, charge you can do is the C/10 charge. That uses a tenth of the C rating current for around 16 hours to get a full charge. For 2500mAh batteries, that will be 250mA for 16 hours. With a C/10 charge you can leave the batteries connected and charging for longer than 16 hours and it won't have any detrimental effect on the batteries.
Most batteries can be "fast charged". This involves pumping a higher current through them for a shorter time. There is a limit to how much current you can pump through before the battery goes pop though, so you have to be very careful doing this. Charging too fast, and charging for too long are both dangerous.
It is perfectly possible to charge multiple batteries together in a chain - most commercial battery packs (like cordless drill batteries, etc) are just chains of NiCd or NiMh batteries in series. However, there are gotchas:
When fast charging you have to stop as soon as one cell reaches capacity. Failure to do so may cause that cell to explode. No two cells have the exact same amount of power - they all vary slightly. When your batteries run down they will all have slightly different charges. Doing a fast charge on a series chain will charge all the batteries up until the battery with the most charge is fully charged. The other batteries won't be fully charged. Next time you charge up the one battery that was fully charged will have even more charge than the ones that never got fully charged. Over time the difference between the one battery that always gets fully charged and the other batteries becomes so great that the battery pack appears dead.
But, doing a C/10 charge you can leave the batteries on charge for longer. You can leave it charging until ALL the cells have fully recharged. I have two battery drills here, both of which were thrown away because their battery packs no longer worked. 16 hours of charging at C/10 later, and I have two perfectly working battery drills.
Now for USB...
USB gives you between 4.5 and 5.5V. It should be 5V, but it varies. And it is limited (normally) to what current it can provide.
Officially, a USB port has to be able to provide 100mA right off the bat. From then it is up to the peripheral you plug in to request access to more current - normally up to a maximum of 500mA. Due to so many phones and other devices having USB chargers, more modern computers have "high power" USB ports which can provide more current directly from plug-in without any negotiation. These can often provide up to an amp or so.
So, say we have 500mA to play with, at 5V.
The simplest C/10 charger is an LM317 adjustable voltage regulator in constant current mode. It requires an input voltage that is in excess of the voltage of the batteries you are charging, plus a bit for the drop-out. So, say you have your batteries in chains of 2 batteries. That's about 3V or so. So 5V should be ample. And say they're meaty ones, at 2500mAh. At C/10, that's 250mA. So, off 500mA we should be able to charge two chains at once. To be on the safe side, drop the current a little to around 220mA - gives a little leeway.
So, set the LM317 to run in constant current mode, at 220mA. A 5.6Ω resistor between OUT and ADJ should give us about 220mA from the ADJ pin, so that's good. That can then charge two batteries in series over a period of about 16 hours quite happily. Build that twice, and you can do 4 batteries in two pairs off one USB port.
For more info about LM317 as constant current I usually refer to this page: http://users.telenet.be/davshomepage/current-source.htm
Oh, and how do you tell if your batteries have charged up? Simple - they get hot. Many battery packs include a thermistor to monitor the temperature. While they are charging the energy is absorbed into the battery. When it can't take any more energy that incoming current is converted to heat. At C/10 the heat will be within the limits of the battery to handle, and it will just feel warm. Fast charging for too long will cause too much heat, hence they explode.