This page shows you how to swap the ⌘ Cmd key with ⌥ Opt key on Mac OS X. (or switching any modifier keys)
Starting with Mac OS X version 10.4, you can switch modifier keys to any other. This is done in “System Preferences”, “Keyboard ＆ Mouse”.
For more advanced key swapping, see: Mac OS X Keyboard Layout, Keymapping, Keybinding, Tools.