The vehicle battery (like a car battery) powers the headlights, the wipers, the cab lights, the indicators etc. It is charged by the alternator, when the engine is running or by mains electricity if the motorhome is connected or "hooked up". Campervans have a second battery - a leisure battery - that powers lights, heater blower fans, cooker extractor, roof vents, water pumps, toilet flush pumps, TV, booster aerial etc. Like the vehicle battery, the leisure battery is also charged by the alternator, when the engine is running or by mains electricity if the motorhome is "hooked up". When your motorhome is parked up at a camp site, chances are, it's hooked up. At this point mains electricity powers all appliances and recharges both the vehicle and leisure batteries. Electric systems are smart enough to provide high voltage to the 2 or 3 pin sockets and low voltage to power the appliances.