Arduino self programming
There are two areas of non-volatile storage in an Arduino: Flash and EEPROM.

Flash is where your program and constant values are stored. Variables with default values also have their default values stored in Flash.

EEPROM is a much smaller area with no real fixed purpose - you can store whatever values you want in there.

Flash can only be written to by code that is in the bootloader area of flash. This is important. A program cannot modify itself. Only the bootloader can modify a program - and then only in chunks ("pages"). It has to erase a whole page before it can write data to it.

The reason why you can't modify Flash from your main program is simple: Flash is the only place code can be executed from. If you erase the page of flash that contains the code that is programming the Flash then everything dies. Horribly. So it's stopped in its tracks by not allowing it to happen in the first place.

EEPROM, conversely, can be written to by anything - the bootloader or the main program. And on top of that individual values can be modified at will - no need to erase pages.1

So to answer the question behind your question ("How can I store and modify settings?"): it's quite simple - store them in EEPROM.

The IDE has examples of how to use the bundled EEPROM library, and there are more details in the Arduino reference manual.



1: Some systems don't have EEPROM, so they emulate it using Flash. These systems still have to erase the Flash in pages, but they try to do it transparently. Some (such as the ESP8266) use a commit() method to update a batch of values. Others, such as chipKIT boards, use wear levelling and separately indexed writing to reduce the need to erase pages.