The Terminal command line is really just a different way to control your computer without using your mouse and graphics, etc. As steve said, it's basically your operating system without any graphics, just text commands. The graphical operating system that is OS X that you see is built upon an old, old operating system called Unix, which is kind of like the frame, seats, and painted exterior of a car built on top of a strong, complicated engine. Working with the Unix underbelly of OS X in Terminal is kind of like opening up the hood of the car and working on the engine.
There's no such thing as a command "residing" anywhere on your system. It's not stored anywhere. It's just that--a command. You're telling your computer to do something just like you would with your mouse. The command is no more saved anywhere than the "double click" is saved anywhere when you double click a file to open it.
E.g. the command
is more or less equivalent to you opening the Finder and double-clicking on your "Documents" folder to open it. It's just a different way to navigate to that folder (although in Terminal, they're referred to as "directories").
The command
is the same as navigating to your Music->iTunes folder in Finder. You're currently
in your iTunes folder in Terminal like you'd be in it in Finder. But you're in it the Unix way. (*Don't do this next step!) Now say you executed the command
and you would delete your entire iTunes library. Poof! Gone. Not in the Trash or anything, just gone. The "rm" command tells your operative system to remove whatever follows. The "-rf" is an option, telling the "rm" command it's okay to delete it even if it's a directory (i.e., folder), and "iTunes Music" is just the thing you're telling to to delete (the quotes being necessary in this case because there's a space in the folder name). This command just the same as if you were in your iTunes folder in finder, highlighted your library, and hit delete (however instead of going to the Trash, the Terminal command actually deletes it--there's no Trash in Terminal).
So I won't go into any more detail right now, but that's the basic idea. It's a good idea to know exactly what a command does before entering it, and when entering it, copy and paste, because the simplest typo could do something you didn't want.
If a software update later comes and fixes whatever your Terminal command was meant to fix in the first place, there are a few possible things that could happen. 1) The "official" fix may do the exact same thing you did, and change the same files you did, or overwrite them, and you notice no difference, because it's the same as before. 2) The official fix corrects the problem in a different way, but overwrites whatever your change was in the process, so you don't notice anything again. 3) The official fix corrects the problem in a different way again, but in an unforeseen way that acts strangely combined with your Terminal "fix." Usually, you can find another Terminal command that will effectively "undo" what you did (you can't actually "undo" a command, but you can execute a command that does the opposite) and make everything work again. This 3rd scenario can be seen in people who used the Terminal command to change their Dock or make their menu bar opaque in 10.5.1 and then experienced strange side-effects in 10.5.2. If you know something's going to correct what you already used a Terminal command to correct, it's probably a good idea to find a Terminal command that effectively undos what you did, but this may not always be necessary.