In Brief
No special procedure or configuration will be required in Ubuntu.
i.e. If you follow your hardware manufacturer's specifications / guidelines and use a compatible battery, the new battery should work exactly like the one that you want to replace when it was new. It should work simply by swapping the old battery with the new one out of the box.
In Detail
Ubuntu like most modern OSes, for this matter, has little to do with your battery. Communication between the OS and the battery happens indirectly and across many layers. Nowadays, laptop batteries are equipped with their own management and reporting Smart Battery System that is made possible by electronics inside the battery package itself and it looks something like this:

The communication process with the OS happens, more or less, like so:
The battery state information is transmitted over a (System Management Bus) SMBus (which is a single-ended simple two-wire bus for the purpose of lightweight communication) to an (embedded controller) EC (which is a microcontroller in computers that handles various system tasks that the operating system does not handle). The EC is interfaced by (Advanced Configuration and Power Interface) ACPI (which provides an open standard that operating systems can use to discover and configure computer hardware components). Ubuntu kernel then gets informed about the battery via ACPI calls / methods.
i.e. Battery <-- EC <--> BIOS ACPI Methods <--> Ubuntu OS:
- EC reads battery information and status from a battery.
- EC generates a (System Control Interrupt / System Configuration Information) SCI to BIOS / OS.
- OS reads via ACPI methods, which query data from EC.
For further details please see the Advanced Configuration and Power
Interface (ACPI) Specification (section 10 starting at page 379 )