What is the purpose of the sharp pods under airliner wings?
They are Anti-shock bodies.

In the transsonic speed range (above about Mach 0.7), aircraft drag is governed by Whitcomb area rule, which basically says that to minimize drag, the aircraft cross-sectional area must change as smoothly as possible, independent of its actual shape. It is somewhat counter-intuitive, but well established.

Compare this Junkers patent drawing (via Wikipedia):



which shows various combinations of positioning engines to adopt the area rule.

For the usual aircraft design the cross-section increases over the engines that hang ahead of the wing leading edge and then the thick part of the wing and wing box (the thicker part of fuselage where wings connect), but the wing tips are too thin and the cross-sectional area would decrease too quickly, so something needs to be attached to the trailing edge to make the reduction of cross-sectional area smoother. The anti-shock bodies are usually conveniently combined with flap actuator and track fairings.

There are however some aircraft that have anti-shock bodies combined with other functions, e.g. Tu-134 (and many other designs by Tupolev Design Bureau) retracts landing gear in its anti-shock bodies (which are just one large on each side):



The flap actuator and track fairings exist on all aircraft that have flaps that extend aft as well as down (Fowler flaps and their double-slotted variants), but on slower planes they are much thinner. Compare e.g. ATR-72, which does not need to be area-ruled with its maximum Mach 0.55.