If it's a video camera, it came with a power cord that plugs in the DC input to charge your battery while the camera is turned off. It stops charging when you turn the camera on. The battery isn't used until the cord is disconnected from the camera or the wall plug.
If it's a still camera it's an optional accessory (for most cameras) that powers the camera so you don't drain your batteries while shooting or connected to your computer. In most cases, there is a separate charger included since the batteries usually don't charge in the cameras.
Cameras that charge the battery inside are mostly Kodak & Casio (usually via a base) and Sony (and some Casios) via a cable connected to the bottom of the camera. There may be other low-end cameras that do that, but most use AA batteries. These will never charge by a cord to the camera since you might have alkaline batteries in it & they would explode if charged.