Use the firmware flasher in the cleanflight configurator.
See the board specific flashing instructions.
When upgrading be sure to backup / dump your existing settings. Some firmware releases are not backwards compatible and default settings are restored when the FC detects an out of date configuration.
See the CLI section of the docs for details on how to backup and restore your configuration via the CLI.