I'm surprised the following was not yet proposed.
You actually don't need any items. Only your hands.
But to understand why that technique works we need to know something about flies. As mentioned by others before, flies have almost 360 degree vision, so they will see you coming. but they have one big handicap: They can only concentrate on two things.
Knowing this, you can slowly approach the fly from behind with your preferred hand and index- and ring-finger spread apart. With any finger of your other hand you pull back your middle finger. It should look something like this:
Your index- and ring-finger touching the surface, you move towards the fly. It will concentrate on those two fingers and won't notice your middle finger. Move your hand really slowly, so you don't scare the fly. When the fly is right below your middle finger it's time for the kill. Just pull away the finger pulling back your middle finger - it will snap down and squash the fly.
You will get a dirty finger, though. But when approaching slowly enough this technique works every time.
This approach however has one downside. It only works good on flat surfaces big enough to fit your fingers next to the fly.
I use this every time a fly lands right on my desk or somewhere near me. I actually prefer using my hands rather than striking with a magazine, since the shockwave of the moving magazine can simply blow away the fly.