Fruit flies, or Drosophila are an excellent food for most small fish, largely representing the natural killifish diet of invertebrates. Flies are the perfect food for surface dwelling fish species, but even killies from the lower strata, like Nothobranchius can be trained to eat them. Drosophila larvae are also a good food for killies, and although rarely a 'favourite' food, are an easy source of small food when worms are not available.
Larvae of any size can be fed to killies to suit their needs. Lots of larvae can be scraped from the sides of their vial, and if a drip of water is added , the rest will make their way out of the media and up the sides. After this you can leave the remaining larvae to hatch turn into flies, or to be really thorough you can add the contents of the vial to a strong (3M) salt solution. The food dissolves away or sinks and the larvae will float, allowing them to be scooped out with a net, rinsed and fed. It is crucial not to over feed with Drosophila larvae, as they drown very quickly (1 hour or less) and although fish do eat them, they do not eat them with the same relish that they enjoy other insect larvae.
Simple throw them in! The flies float on the surface, sometimes in clumps. If they can get to the sides they will climb out. Feeding fish with fruit flies is easy when the fish are hungry and waiting, however some will always escape. Surface feeders, such as Epiplatys will devour them quickly, however other species need to be trained, not so much to eat them, but to notice that they are there! Unless your fish are mad for fruit flies, only feed a few at a time! Again, 5-8 minutes in a freezer can immobilise flies for some time, but they do wake up after a few seconds in warm tank water.