That depends on many things.
What kind of OS are you running? If you're running windows you can right click and then go to properties and there's actually a button that says change icon. Otherwise different file types come default with an icon. Example normally anything as Blah.txt will have a little picture of a notepad
What compiler are you using?
If it is Dev-C++ then read this:
Create a new project, if you don't want a template then just select blank, select C or C++ then create it.
Go to: Project ---> Project Options
Then in the bottom left there is the icon control.