Now then, add some water into it until the lip of the thing is full of water, and then throw in some yeast and a pinch of sugar. Make sure the cork is put into the trap. Apparently how this thing works is that the flies can get in, but for some reason, cannot fly down to escape.
Now, stick the thing into a tree. You won't see anything happen for a few weeks, so I just wanted to give you that caveat. But a few weeks in, you'll see the thing filled to the brim with flies.
Give it a while, to make sure they're all dead, and then take the trap down, dump it out somewhere, clean, and repeat. You're welcome.