Physicist: The narrative that usually leads to this question is something like: “It was the Wright brother’s brilliant wing shape, among other design innovations, that first made manned flight possible”. So if the wing shape is so important, why does it still work if it’s flipped upside-down?
A wing (or airfoil or whatever) creates lift by taking advantage of a combination of the Bernoulli force and “angle of attack”. By increasing angle of attack (tilting the nose up) the oncoming wind hits the bottom of the wing more, and pushes the plane up. However, this force also increases drag substantially. The Bernoulli force shows up when the air over the top of the wing is faster than the bottom, but it requires a bit of cleverness to get it to work. Cleverness like the Kutta-Joukowski condition.
When the Wright brothers built “the Flyer” (they were smart, not particularly creative) the engines available at the time were not powerful enough to lift themselves using only an angle of attack approach, so using a slick airfoil shape to take advantage of Bernoulli forces was essential to get off the ground. Using the engines we have today (jets and whatnot) you could fly a brick, so long as the nose is pointed up.
So to actually answer the question; back in the day planes couldn’t fly upside-down. But since then engines have become powerful enough to keep them in the air, despite the fact that by flying upside-down they’re being pushed toward the ground. All they have to do is increase their angle of attack by pointing their nose up (or down, if you ask the pilot).