Most cordless impact drivers have detachable batteries, which can be disconnected from the main part of the tool when it comes time to charge them. On the rare occasion that you find an impact driver with an integral battery, it will come with a charger to connect to a mains power supply.
Recharge time
How long the battery takes to recharge will depend on the make and model of your battery and the charger.
Some chargers claim to charge batteries within 30 minutes.
Spare batteries
If you want to use your cordless impact driver while the battery is charging, you will need to purchase a spare battery to use in it.
Workers in the construction industry usually have several spare batteries so their tool is never out of use during the workday.