How to add a text to an image in Android

If some one click on ‘share on whatsapp’ in Instagram, the image will automatically add the user name in that photo. How can I make it.

Hope you understood what I mean.
If not then please open the Instagram app and click ‘share on whatsapp’ or ‘share on messenger’ of any post on your feed, you will understand.