If you compare penguins' wings to other birds' wings, you may recognize that penguins' wings are smaller and more stiff. Also the bones are heavier and not hollow inside. These are the main factors that penguins are unable to fly. The wings are adapted perfectly to swimming and diving so they are called "flippers" scientifically.
The motion of the flippers in the water is comparable to birds' wings while they are flying. In water the flippers are responsible for the propulsion, other birds use their feet for this process. Additionally, the penguins' feet act like a rudder and make it possible to swim fastly and versatilely.
Not only in water the penguins' flippers are very useful but also on land they have important functions, for example for communication. Aggressive behaviour is indicated by heavy flipper beats whereas flippers can also be used during courtship (for example in the "arms act" in which the male is standing behind the female and lets the flippers vibrate at each side of the female - some penguin species show this behaviour before copulation occurs). Flippers are also helpful for balance. That is why you can sometimes observe that penguins put forth their flippers while waddling.
Furthermore, flippers are very important for camouflage. On the one site flippers are black like the penguins' back and on the other site they are white like their belly. In water, you cannot differentiate the penguins' back from the dark of the deep sea. If you are diving under a penguin, you cannot see it because of the bright surface of the water. This phenomenon is called countershading.
Penguins have a strong breast musculature which can move the flippers very well. The biggest breast muscle (pectoralis) pushes the flippers down while a smaller breast muscle (supracoracoideus) pulls the flippers up. The fact that the penguins' breast musculature execute both movements let penguins swim fastly and so they can catch their prey or avoid predators better.
Louw, G. J., Functional anatomy of the penguin flipper, 1992. Journal of the South African Veterinary Association 63.3 113-120.
Schroeder, Kristen L., et al., Fibre types in primary ‘flight’muscles of the African Penguin (Spheniscus demersus), 2014. Acta Zoologica
Richdale, L. E., Sexual behavior in penguins, 1951
Fowler, G. S., & Fowler, M. E. (2001). Order Sphenisciformes (Penguins). Fowler ME, Cubas ZS. Biology, Medicine and Surgery of South American Wild Animals, 1, 53-64..