Usually dash cams come with a 12v/cigarette lighter charging cord. In my car, the 12v ports turn on and off when the car turns on and off. The cameras are designed to start up and start recording when they receive external power, and have small battery or capacitor that lets them save files and turn off when the external power source is turned off.
My car doesn't turn off my lighter port when car is turned off and I'm not sure I'll remember to unplug it every time I get out of my car which could result in a dead battery. :/
There are dash cameras that are designed to be run 24/7, and you typically need to hardwire them to your battery. That way you can capture any vandalism/comprehensive damage that happens when the car is parked. From what I understand, they can go several days recording on the cars battery, so you could check the actual power usage or look for an always-on camera system that is designed for such use. You'd still need to run the car every couple days to keep the battery fully charged, but if you drive a lot it would work fine.
benmanns basicaly has my setup down. It's plugged into the 12V cigarette lighter port, the cable is wrapped numerous times around a display my car has built in, and the wire just dangles the 4 or 5 inches from the camera to there - it's not in my view so doesn't bother me.