EDIFACT stands for Electronic Data Interchange for Administration, Commerce and Transport. It is maintained by UN/CEFACT, the United Nations centre for trade facilitation, and is widely used in Europe, Asia and international trade, including retail, automotive, shipping and customs. North American companies typically use ANSI X12, so a company that trades globally often needs both.
Where X12 uses numbered transaction sets, EDIFACT uses named messages: ORDERS for a purchase order, ORDRSP for an order response, DESADV for a despatch advice (the equivalent of an advance ship notice) and INVOIC for an invoice. Each message is wrapped in UNH/UNT segments inside a UNB/UNZ interchange envelope. EDIFACT publishes numbered directories, such as D96A or D01B, and industry groups define their own subsets.
X12 vs EDIFACT: both standards do the same job, and documents can be translated between them through EDI mapping. The differences are in syntax, naming, code lists and versioning. What matters in practice is supporting the standard each trading partner requires, without building a separate process for every one of them.