It's actually surprisingly complicated, because every platform treats icons differently, and often the platform-specific rules are themselves complicated, involve lots of formats and variations, and also change those rules on a regular basis too.
Where possible, when exporting Construct automatically uses the largest icon in the icons folder as the main icon for your project. It may also use the smaller icons if the platform allows this and they can be automatically specified.
However the platforms where this can happen and the precise icons that get used are different, and keep changing too. So basically Construct makes a best-effort attempt to use the icons in that folder automatically, but you should check the exported result and update or customise any icons after export if you need to (e.g. in Xcode for iOS).