What is this insect that showed up after I left food out? How can I get rid of it?
It is likely a fruit fly, a Drosophila melanogaster. 



I've tried different methods to trap then but the most effective way I found is this. You need a container (pan, jar, bowl, whatever), vinegar (I use any type), a drop of dish soap, and plastic wrap over the top with holes poked in. Then the flies cannot stand on top of the liquid but also have issues escaping through the holes in the plastic wrap.