Now here is a very complicated answer from a boffin who sounds like he knows what he is talking about, even if I don't:
Earwax is a mixture of desquamated keratinocytes and hair combined with the secretions of both the ceruminous and the sebaceous glands of the external ear canal. This study analyzed earwax using the combination analytical technique of gas chromatography and mass spectrometry. The major organic components of earwax identified were long chain fatty acids, both saturated and unsaturated, alcohols, squalene and cholesterol. This study demonstrated that it is not currently possible to quantify statistically the substances which constitute earwax with accuracy. The presence of foreign substances within earwax was identified as a complicating factor in the analysis of earwax.
http://www.ncbi.nlm.nih.gov/entrez/query.fcgi
Wikipedia dumbs it down for people like me:
Cerumen is produced in the outer third of the cartilaginous portion of the human ear canal. It is a mixture of viscous secretions from sebaceous glands and less-viscous ones from modified apocrine sweat glands.[1] The primary components of earwax are the final products in the HMG-CoA reductase pathway, namely, squalene, lanosterol, and cholesterol.