A regulator looks a bit like this. It's there to take the AC off of the Generator and turn it into something the truck can use, namely, DC.
Sorry, but I must dispute this. A generator produces DC current. A regulator regulates the amount of current.
An alternator produces AC current. It uses a rectifier to convert it to DC.