12.04
For those who like having a GUI: In 12.04 you also have the option of using Arronax which is a Nautilus plugin to create your launcher (.desktop files to be more accurate), heres an explanation of how it works.
If you already have the application launcher you can simply right click and click on the "Create starter for this file" option as shown below.

If you have desktop icons enabled you can create your own launcher with specific commands by simply right clicking on your desktop, this will give you the following option to create a blank starter:

Once you have clicked on "Create Starter" you will have the following dialogue box open where you can easily customize your starter with whatever command you'd like:

Once you've saved your launcher to your desktop you will see a file as shown here:

You then simply pick it up and drag it onto your dock in whatever place you like:

A couple of nice features:
Being able to assign Keywords to the command so it becomes searchable through the unity dash.
Relatively quick to create launchers for Windows programs in Wine as explained by this youtube video (haven't tested this out myself though)
Installation
Disclaimer prior to installing: Arronax is still in an Alpha stage of development due to there not being that many programmers working on it, I haven't had a single issue with it but I prefer giving you a heads up in case this affects your choice on installing another PPA you don't know.
To install using the terminal window (Ctrl+Alt+T to open it) type in the following commands:
sudo add-apt-repository ppa:diesch/testing
sudo apt-get update
sudo apt-get install arronax
After doing this you will have to restart Nautilus either by logging in and out, or by typing the following in the terminal window:
nautilus -q
11.10
I intended for this to be an edit to Bart van Heukeloms answer as it also works for 11.10, but as a moderator kindly pointed out when I suggested the edit, it is a different answer, despite being one that works too. I tried this a few times on 11.10 before I upgraded and didn't have any issues.
However I cannot vouch that it still works perfectly although I expect it should still work.
Installation in 11.10 is exactly the same as in 12.04.
Note: This quick tutorial is shamelessly inspired/plagiarised from Meilins post on the Ubuntuguide website so he is due all the credit.
gedit
) and remove the row with localized icon, in my caseIcon[sv_SE]=gnome-panel-launcher
and leave the other "Icon=" row.