Open the image that you would like to be the folder icon in Preview.
Press ⌘ cmd + A to select the entire image and press ⌘ cmd + C to copy it.
Get Info (⌘ cmd + I) on the folder.
Click the folder icon on the top-left and press ⌘ cmd + V to paste in the icon.
To revert back to the default blue folder…
Get Info on the folder.
Click your icon in the top-left.
Press ⌘ cmd + X.
The folder icon is stored in the folder, as a hidden file.
0 directories, 1 file
You can also remove the folder icon using the following Terminal command inside the folder with the icon that you wish to remove: