Store data in non volatile memory, EEPROM
ATmega328P.pdf ( Register summary on p 428 )It is usual to lose your data when you turn off the power to the processor.
Much of your data is temporary, but there are data that have be retained at different occasions,
such as personal settings.
Typical example is a combination lock that comes with a default code (often 1234) that the user should replace with their own code.
ATmega328/P has an EEPROM memory of 1024 bytes which can be used to store away the setting information.The memory is not addressed in the normal manner, but byte for byte via special registers.

The full program is available here:
remember.txt
(for Arduino use code stored as: remember\remember.ino)
William Sandqvist william@kth.se