How to add logo to a WordPress Custom Plugin?

I hope you are referring about plugin icons. Actually these icons are not adding in plugin folder. These are coming from from wordpress account. When you upload plugin into wordpress plugin repository, icons and images are upload to assets directory of your SVN directory. You can add icon as icon-256×256.png and it will appear in core update page.

Reference: https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/