They have built-in G-sensors or accelerometers that detect an impact, and in the event of a crash they automatically save that footage from being overwritten.
Dash cams for trucks should have a quality recording, wide-angle viewing, and good night-time quality if they drive through the evenings.
If you're recording your trip for insurance, you may want a cheaper model that's low profile.
Buy this camera if you are looking for a low-budget option to dip your toe into the dash cam market.