There are various "endorsements" available for CDL holders, to be able to haul different freight like tank trucks and hazardous materials.
The endorsements will require a separate test for each, and you can usually take them at the same time as your permit test, for a small additional fee.
The rules for when you can take the Hazmat test vary by state, but keep in mind that a TSA background check will have to be approved before you can get the actual endorsement, which usually takes around 30 days.
Simply put, you should get all endorsements that are available. It will open up more opportunities down the line for the types of cargo you can haul.
Article - Which CDL Endorsements Should I Get?
The question of which CDL endorsements you should get is incredibly simple - all of them. Why? Because every endorsement is an opportunity at a whole subset of truck driving jobs (or bus driving for that matter).
FMCSA - Endorsements & Restrictions
Only 3 endorsements are allowed on the learner's permit: Passenger, School Bus, and Tank. Hazmat, Combination, and Doubles/Triples are only available after receiving your full CDL.
Again, having the Hazmat and TWIC will make you available for more opportunities when it comes to hauling freight.
Additionally, many trucking companies will require you to have them, either as a condition of hire or by requiring you to get them in a certain time frame afterwards.
Wiki - Hazardous Materials (HAZMAT) Endorsement
The Department Of Transportation (DOT) has classified certain materials as hazardous, and truck drivers are required to obtain a specific HAZMAT endorsement in order to transport them.
Various restrictions can be placed on your CDL, for things such as not taking the skills test in a vehicle equipped with an automatic transmission, taking the test in a lower class vehicle, or not passing the Air Brakes knowledge exam.
We will always recommend that new drivers go for the Class A license, with all endorsements, and take the exam in a truck with a manual transmission. There are no reasons NOT to do these things, and will help you in the long run.
Wiki - CDL Endorsements and Restrictions
Individual states may have additional testing requirements, endorsements and-or restrictions for CDL holders. It is important to review the CDL manual for your specific state for endorsement requirements.
FMCSA - Overview of Classes, Endorsements, & Restrictions
The types of vehicles and operations requiring a CDL are outlined below. The Federal Motor Carrier Safety Administration (FMCSA) has developed and issued standards for State testing and licensing of CDL holders.