Porphyria is caused by deficiencies in enzymes involved in heme biosynthesis, leading to accumulation of porphyrins and their precursors. There are several types of porphyria classified by enzyme deficiency, symptoms, or origin of excess precursors. Acute porphyrias involve neurologic or abdominal symptoms, while cutaneous porphyrias cause skin problems when exposed to sunlight. Porphyria results from partial deficiencies in enzymes that are sufficient under normal conditions but can be exacerbated by external factors, causing intermediates to accumulate and spill over.