First letter is region, E=northern Europe, L=southern Europe etc.
Second Letter is Country, ED=Germany (D=Deutschland), EG=UK (G=Great Britain), LO = Austria ( sterreich), LF = France etc.
Third letter is used (in germany, probably in other countries it´s the same) either for special types of airfield, EDD = international Airport, EDDK = Cologne, EDDF = Frankfurt, EDDH = Hamburg etc.
EDC = military airfield operated by foreign airforce, EDCM = Aachen Merzbrück while operated by belgian helicopter squad (changed to EDKA when the belgians left).
For small airports, third letter is equal to last letter of the nearest international airport, EDKA = Aachen, EDKB = Bonn, both close to EDDK = Cologne. EDMO = Oberpfaffenhofen, close to EDDM = Munich, EDHK = Kiel, close to EDDH = Hamburg, EDFH = Hahn, so close to Frankfurt that some chaep irish airlines confuse those
Last letter is mostly first letter of airport name, EDKB = Bonn, EDDK = Köln (Cologne), EDKA = Aachen, EDCM = Merzbrück, EDDH = Hamburg, EDMO = Oberpfaffenhofen etc.
Some exception are the military airfields operated by the german airforce, they are named ET istead of ED, for example ETNU = Neubrandenburg, ETSI = Ingolstadt-Manching, ETNL = Rostock-Laage, ETMN = Nordholz.
hope this helps