A nomedia (.nomedia) is empty text file whch is saved as .nomedia and which when stored in any folder in android when media scanner scan this file it skips that folder and scan next folder which means the media files (audio, video, images etc ) in the folder does not appear any where nor in the gallery nor in any music or video player
It allows us to hide a file from gallery without any application
Imagine if you open your gallery you see every image or video two to three or even more times that you have send to various group or people in a whatsapp and it slow up your gallery to load all the images that is available in your phone. To avoid this situation whatsapp use nomedia file when you install then it creates the whatsapp folder in your main storage in that direct to Media->whatsapp images->sent you will .nomedia in that (Note:- For seeing .nomedia first of all enable option show hidden file & folder ).
HOW YOU CAN CREATE A NOMEDIA FILE ?
Or simply you can copy this file from Whatsapp->Media->whatsapp images->sent and paste it to the folder where you want to stop media scanning