What is the difference between a pulmonary edema and a pulmonary embolism?

Fluid vs Clot. Pulmonary edema is a swelling and fluid accumulation in the lung tissue. A pulmonary embolism is a clot that has travelled (usually) from the legs, through the blood stream, and lodged in the circulation of the lung.
Another thought. The formation of a clot in the lung may originate in the lung as well. If there is underlying lung disease or cardiac disease, then these are risk factors potentially for the formation of an embolism.