Replacing a water heater igniter depends on the type of igniter used, but most systems are sold as self-contained units. Once the old igniter is detached and its gas connection is shut off, the new unit can be placed and tested before the gas is turned back on.
When replacing igniters, it's important to make sure that no gas is flowing before testing ignition. In addition, it's best to wait a few minutes after the gas has been shut off to ensure that any residual gas has time to safely disperse.
Standing pilot lights remain popular on gas water heaters due to their simplicity and reliability. The mechanical operation of igniters used on standing pilot light systems means that replacement is typically straightforward. However, it's worth checking the thermocouple before replacing the entire unit. Thermocouples measure the temperature of the system and shut off the flow of gas if improper temperatures are detected.
Standing pilot lights waste a bit of gas when they are used, so newer water heaters often use spark igniters that light the gas automatically. Since these devices are a bit more complex, there are typically more sensors to check before replacing the unit, but some have a "test" button that might produce a visual spark if it's operating correctly. It's also worth checking and resetting any connected thermostats to make sure the gas valve functions correctly.