Let me elaborate. No matter what type of visa you have, if you overstay, you will be out of status.
The difference between these visa types is that one can be used to apply for a change of status to permanent resident (green card) and the other does not.
If you want to get a green card and you have a non-immigrant visa, you have to apply to an immigrant visa first. There are exceptions but for temporary workers this is the case.