For novice help with the command line, see
Visual Kindle Guide. In particular, look at "Command Prompt Vista/XP/Mac" and "Kindle Mobi2Mobi Mac". On a Windows PC (and I assume a Mac), Calibre makes sure its commands are automatically in the command "path" so you just type them in from any folder.
Note that many of the commands change under
calibre 0.6 beta which will very soon be the default.