This page has links to examples for using the internal EEPROM and for using an external via I2C.
Depending on the amount of data you need to store and the frequency will probably determine if you use an internal or external solution.

I will suggest starting with the internal for practice.
http://melabs.com/samples/PBP-mixed/ee.htm
and
http://melabs.com/samples/PBP-mixed/eeword.htm

Once the examples are working then add an input button. Try increasing the data stored at a location by 1 every time the button is pressed.