The migration module (currently only on github, and only works with Drupal 6.x) helps Drupal system/site administrators migrate arbitrary changes between multiple versions/environments of the same Drupal website. As outlined in this short guide, one way to track changes for later migration is by (a) making changes to a Drupal site (on a local developer machine, for instance) then (b) encoding these changes in a hook_update_N function.

Documentation on the migration module:

For more modern situations you'll want to refer to the Migrate page instead.