This generally means that the database that a part of OS X called "Launch Services" uses to figure out which files go with which applications (and thus which icons to show) has gotten corrupted.
You can use
this free application to rebuild the Launch Services database on your machine.