Your question is not very specific. Do you want to learn how to add functionality to games which allow this (i.e. mods)? Or do you want to learn how to develop a game your own?
For the first question there is no general answers. It all depends on the specific game and its support for modding...