If installed correctly and kept plugged in, a dash cam will automatically record when the engine is turned on. When the engine is turned off, the dash cam will automatically stop recording.
If you are looking for a dash cam that will constantly record even when your car is off, look for dash cams with 24-hour parking mode. If you often have to street park in an area with frequent break-ins, this may be an excellent option for you. With parking mode, the dash cam will continuously record for up to 24 hours even when your car is off.
For a dash cam to have these capabilities, it will either need to be hardwired to your car or have an internal battery.