The easiest way is to add an entry to the registry under HKEY_CLASSES_ROOT. Just fire regedit and take a look around the defined keys and values there.
Basically you first create a subkey in HKCR that defines the extension. The keyname is a dot followed by the extension you want to associate. Once you created this key, you change the value of (default) to the name of your app or something that describes the file. Under HKCR you create another subkey with that exact same app name or description. Now your extension points to this key. Under this key you create another subkey 'Shell', which has a subkey 'Open', which has a subkey 'Command'. Here you can change (default) value to the command that must be launched when Open is chosen in the context menu or the file is double-clicked.