I would just like to add something here.
These answers are great but I might have another answer.
At first it was indeed a mystery how these insects were capable of flying, but thanks to high speed recordings they found something which investigators didn't concider. The wing motion has a sort of dubble lift feature.
By twisting her wings over at the end of each downstroke, the upward momentum is never lost.
basically, this means that even when the wings are going upwards, the wings provide upward lift.
(this also explains why bumblebees are so massive, they need a lot of muscle to get at the needed (Ca.) 300 flaps a minute)
I hope this was a complete answer!
Cheers.