A glyph is an element of writing. A vague term, but a more precise definition might be an individual mark on paper or another written medium that contributes to the meaning of what is written there. A grapheme is made up of one or more glyphs.
For example, in most languages written in any variety of the Latin alphabet the dot on a lower-case letter ‘i’ is not a glyph because it does not convey any distinction, and an i in which the dot has been accidentally omitted is still likely to be read as an ‘i.’ However in Turkish it is a glyph, because that language has two distinct versions of the letter ‘i,’ with and without a dot.
In Japanese syllabaries, a number of the characters are made up of more than one separate mark, but in general these separate marks are not glyphs because they have no meaning by themselves. However in some cases, additional marks fulfil the role of diacritics, to differentiate distinct characters. Such additional marks constitute glyphs.
In general a diacritic is a glyph, even if (like a cedilla in French, the ogonek in several languages or the stroke on a Polish L) it is “joined up” with the rest of the character.
Some characters such as æ in Icelandic and the ß in German would probably be regarded as glyphs: they were originally ligatures but over time have become characters in their own right, and these languages treat them as separate letters. However a ligature such as ‘ffi’, which is treated in some typefaces as a single unit, is arguably not a glyph as this is just a quirk of the typeface, essentially an allographic feature, and includes more than one grapheme. In normal handwriting, even long words are often written ‘joined up’, without the pen leaving the paper, and the form of each written letter will often vary depending on which letters precede and follow it, but that does not make the whole word into a single glyph.
Two or more glyphs which have the same significance, whether used interchangeably or chosen depending on context, are called allographs of each other.