for folders, files, non-packaged apps, the conventional method of getinfo, copy, paste works fine.
packaged apps usually have .icns file in
whatever.app/contents/resources/
the name of the file is different from app to app, but it should be pretty obvious.
you can change the icon by replacing the .icns file.
HD's icons can be changed by copy/paste but you need to show the volumes on desktop.
and in rare occasions, the file/folder is owned by the system. If you want to change the icon, you can temporarliry change the ownership with chown in terminal, or (if you're bored enough) logout and come back in as root (I haven't done this myself, but I don't see why it shouldn't work).