Before OS X Mountain Lion, you could drag an icon out of the dock and and it would disappear when you let go of it. This also used to work with the Finder's sidebar entries, but Apple has removed both of these in Mountain Lion.
With Mountain Lion's Finder sidebar, you have to right-click an entry and choose Remove from Sidebar from the contextual menu.
It might appear that this is now the only way of removing icons from Mountain Lion's dock, too. But I discovered that if you drag an icon out of the dock, then hold it anywhere for a second, the first frame of the "poof" animation appears next to the cursor. When you release the mouse button, the icon will disappear.
This is a nice touch to prevent users from accidentally removing icons from the dock.
[kirkmc adds: This irked me when I finally installed the Mountain Lion GM on my main Mac. I didn't come across this drag-and-hold-a-second thing, and it's good to know. The Finder sidebar bit is annoying, and maybe the same trick will eventually work there.]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20120721035234237