Houseflies always take off in the direction their butt is pointed. Sweep your hand in from behind them and you can catch them with pretty fair reliability. Just don't close your hand too tight.

Once you've got the little booger, you can release it outside, throw it into the toilet and flush, hurl it into the surface of a table or counter and squash it while it's still stunned, etc.