It turns out that flat wings work just fine, but the airfoil shape we see on airplanes is more efficient:
A "stall" happens when the wing is no longer directing air downwards (and thus not providing lift), and is instead just chopping up in the air into turbulent chaos without any consistent direction.