When the service engine light comes on what is the problem with the truck? on 2001 Chevrolet Silverado 1500 HD

what are the codes?

You will have to have a scan test performed to find out! Then post the code numbers (exactly) and we may be able to help.
AutoZone/Advance Auto can do this for free. Or go to a repair shop where a mechanic can look at the vehicle after test.
Even if you post codes gathered from a free test, we will still be guessing at the actual problem!
Hey Wetry, please contact me at jmgrhm30@gmail.com