...or, you could use the TAB menu and change the "input (this game)" settings. It will then save them to <gamename>.cfg in the cfg folder.
The pro of this option is that it once it's setup, mame will use it automatically, no file copying/renaming on your part.
The con of this option is that you have to do this for EACH game that you want to be different than the defualt config. But you only have to do it once...
As for .ini files (your original post topic)...the .ini files only contain info such as screen refresh, scanlines, frameskip, mouse enabled, etc. settings. If you want to change these things for a certain game, simply copy mame.ini to <gamename>.ini in the default mame directory.