You probably inadvertently dragged the icon off the Dock. Don’t worry, you didn’t delete the program, only the alias to the program that was in the dock.; Let’s take iCal as an example.
In the Finder, open the Applications folder and you will see iCal.
Click and hold on the icon of iCal and drag it down onto the dock. Release the mouse button when the pointer is over the left hand half of the dock, and the OS will create a dock icon (alias) for the program. It doesn’t matter where you drop it, once it is there you can move the icon right or left on the dock by clicking and dragging it.
If you drag it up off the dock and release, it will disappear in a little puff of smoke – the OS interprets you dragging the icon off the dock as you didn’t want it anymore, so it deletes the alias.
All about the Dock: http://support.apple.com/kb/ht2474
If you accidentally drop the iCal program icon onto the desktop on the way to the Dock, don’t panic. Just click and hold on the iCal icon and drag and drop the iCal back into the Applications folder. Then try again.