A GEDCOM is plain text, which means most of what goes wrong with one can be fixed in a text editor, or in GED-VIEW's File editor (File > File editor, part of Pro), which saves and re-reads the file. Here are the common ones.
Most of them GED-VIEW fixes for you: Tools > Repair file lists what is wrong with the file as a file (a link to a record that does not exist, two records with the same ID, a record without an ID, lines that are not GEDCOM, a missing header or trailer, garbled text, text saved after being read with the wrong character set), with a tick and a choice of fix for each, and writes a new file. The original is never modified. The rest of this page is for doing it by hand.
Work on a copy. Keep the original.
"Cannot process line 1" or "expected 0 HEAD"
If the first line looks like 0 HEAD, those three characters are a byte order mark: a UTF-8 signature that some programs write and some readers choke on. GED-VIEW ignores it. If another program refuses the file, delete those characters so the line starts with 0 HEAD, and save as UTF-8 without BOM (most editors have that option in Save As).
Blank lines
The GEDCOM standard does not allow empty lines, and some strict readers stop at the first one. They usually come from hand editing or from a note that contained a blank paragraph. Search for two line breaks in a row and remove one. In a note, replace the blank line with a 2 CONT line so the paragraph break survives.
Lines with no level number
Every line starts with a number: 0 for a record, 1 for something inside it, 2 for something inside that. A line that starts with text instead usually means a long note was pasted in without being split properly. Prefix each stray line with the right level and the tag CONT:
1 NOTE This is the first line of a long note
2 CONT and this is the second
2 CONT and this is the third
CONC and CONT confusion
Older files (5.5.1) split long text across lines using CONC (join with no space) and CONT (join with a new line). If a program wrote them wrongly, words run together or lines break mid-sentence. There is no clean automatic fix; if it matters, re-export from the source program. GEDCOM 7 removed CONC for exactly this reason.
Duplicate IDs
Every record has an identifier like @I42@ and it should be unique. Pasting one file into another produces duplicates, and readers then link facts to the wrong person. One of the two needs a new number, and every reference to it in the file needs to change to match. Repair file does exactly that ("Give the later record a new ID"); by hand it is search and replace, carefully. Do not do it by hand on a large file.
References to records that do not exist
A citation pointing at @S99@ when there is no @S99@ record. Usually left over from a partial export. GED-VIEW loads the file, shows the citation as unresolved, and reports how many there were. It is safe to leave. Repair file can drop the link or point it at nothing (@VOID@, the GEDCOM 7 way to say so); by hand, delete the pointer line or re-export if it bothers you.
Missing 0 TRLR
The last line should be 0 TRLR. If it is missing the file was truncated. Add the line (Repair file offers to) and the file will load, minus whatever was cut off.
When to give up on editing by hand
If there are hundreds of problems, or the file is very large, editing by hand is a mistake. Re-export from the program that made it, with the settings from the relevant export guide. Nearly every corrupted GEDCOM was made by an old version of a program that has since fixed the bug.
Next
Check the first line and the last line of the file. Those two catch most of it.