How to add icons in any doctype?

I have installed ERPnext using easy install script and was looking to customize the whole UI to fulfill some additional purposes. Can anyone tell me how to add an icon and make considerable changes in frontend and backend code??

Can anyone answer this?