An EDI file is basically just a text file with strictly formatted text inside which makes it easy to exchange data. EDI was designed to give companies a standard way to exchange data. There is no standard for the file extension, but it is normally .txt or .edi, and some trading partners will specify what it should be.
Every EDI ANSII (American National Standard for Information Interchange) X12 file starts with an ISA segment, and ends with an IEA segment. Sometimes the file can contain multiple ISA-IEA blocks, it is permitted in the EDI specs. However, most trading partners only permit 1 ISA-IEA block per text file. If you are unsure, it's best just to plan to have 1 ISA-IEA block per text file.
The ISA segment must be exactly 106 characters, and each element contained in an ISA segment has a specific length.