If you are talking about the blue box on the drivers side, it is the voltage regulator. There is a lot of info on this site about this. Basically the M1010 has two 28v alternators, one charges both batteries and one is regulated down by the blue box to charge the front battery or if the 28v load is high enough to provide power for that. It is very hard to get it to work right and unless you are restoring a show truck, I would do something else. If you can find a NOS one, you will have to pay hundreds of dollars for it. A more modern replacement is available. Several solution were discussed here in the past.
After much adjustments and going through both -20 and -34 TMs I got mine to not overcharge the back battery and to keep the front battery form going dead but it is never really fully charged either. I occasionally put a battery charger on it.