Getting rid of flies can be tricky. However, an old proverb comes to mind: you catch more flies with honey than with vinegar. If you really need to catch a fly in the next ten minutes, grab a fly swatter and swat at it like crazy. You’ll hit it eventually. If you have more time than that, you can use honey to make a trap. This is relatively easy, but for more specific instructions, you should use the internet or ask around.
One way to make a trap is to put honey a bowl and use a funnel to lead the flies towards the smell. It’s easy to get in, hard to get out. The flies will die in the honey.