In the field of acoustics, a diaphragm is a transducer intended to faithfully inter-convert mechanical motion and sound. It is commonly constructed of a thin membrane or sheet of various materials. The varying air pressure of the sound waves imparts vibrations onto the diaphragm which can then be captured as another form of energy (or the reverse).
In a loudspeaker, a diaphragm (generally, but not exclusively cone shaped) is the thin, semi-rigid membrane attached to the voice coil, which moves in a magnetic gap, vibrating the diaphragm, and producing sound. Diaphragms are also found in headphones and microphones.
Quality midrange and bass drivers are usually made from paper, paper composites and laminates, or plastic materials such as polypropylene or mineral/fiber filled polypropylene. Such materials have very high strength/weight ratios (paper being even higher than metals) and tend to be relatively immune from flexing during large excursions. This allows the driver to react quickly during transitions in music (i.e. fast changing transient impulses) and minimizes acoustical output distortion.
If properly designed in terms of mass, stiffness, and damping, paper woofer/midrange cones can outperform many exotic drivers made from more expensive materials. Other materials used for diaphragms include polypropylene (PP), polycarbonate (PC), Mylar (PET), silk, glassfibre, carbon fibre, titanium, aluminium, aluminium-magnesium alloy, nickel, and beryllium. A 12-inch-diameter (300 mm) paper woofer with a peak-to-peak excursion of 0.5 inches at 60 Hz undergoes a maximum acceleration of 92 "g"s.
Paper-based cones account for approximately 85% of the cones sold worldwide. The ability of paper (cellulose) to be easily modified by chemical or mechanical means gives it a practical processing advantage not found in other common cone materials.
The purpose of the cone/surround assembly is to accurately reproduce the voice coil signal waveform. Inaccurate reproduction of the voice coil signal results in acoustical distortion. The ideal for a cone/surround assembly is an extended range of linearity or "pistonic" motion characterized by i) minimal acoustical breakup of the cone material, ii) minimal standing wave patterns in the cone, and iii) linearity of the surrounds force-deflection curve. The cone stiffness/damping plus the surround's linearity/damping play a crucial role in accuracy of the reproduced voice coil signal waveform. This is the crux of high-fidelity stereo.
The surround may be resin-treated cloth, resin-treated non-wovens, polymeric foams, or thermoplastic elastomers over-molded onto the cone body. An ideal surround has a linear force-deflection curve with sufficient damping to fully absorb vibrational transmissions from the cone/surround interface, and the "toughness" to withstand long-term vibration-induced fatigue. Sometimes the conical part and the outer surround are molded in one step and are one piece as commonly used for a Guitar speaker.
Microphones can be thought of as speakers in reverse. The sound waves strike the thin diaphragm, causing it to vibrate. Microphone diaphragms, unlike speaker diaphragms, tend to be thin and flexible, since they need to absorb as much sound as possible. In a condenser microphone, the diaphragm is placed in front of a plate and is charged.  In a dynamic microphone, the diaphragm is glued to a magnetic coil, similar to the one in a dynamic loudspeaker. (In fact, a dynamic speaker can be used as a rudimentary microphone, and vice versa.) 
The diaphragm in a microphone works similarly to the human eardrum.
In a phonograph reproducer, the diaphragm is a flat disk of typically mica isinglass that converts the mechanical vibration imparted on the needle from the recorded groove into sound. In the case of acoustic recording the reproducer converts the sound into the motion of the needle that scribes the groove on the recording media.