The first monosaccharide attached in the synthesis of O-linked glycans is N-acetyl-galactosamine. After this, several different pathways are possible. A Core 1 structure is generated by the addition of galactose. A Core 2 structure is generated by the addition of N-acetyl-glucosamine to the N-acetyl-galactosamine of the Core 1 structure. Core 3 structures are generated by the addition of a single N-acetyl-glucosamine to the original N-acetyl-galactosamine. Core 4 structures are generated by the addition of a second N-acetyl-glucosamine to the Core 3 structure. Other core structures are possible, though less common.
Images:
https://www.ncbi.nlm.nih.gov/books/bv.fcgi?rid=glyco.figgrp.561 : Core 1 and Core 2 generation. White square = N-acetyl-galactosamine; black circle = galactose; Black square = N-acetyl-glucosamine. Note: There is a mistake in this diagram. The bottom square should always be white in each image, not black.
https://www.ncbi.nlm.nih.gov/books/bv.fcgi?rid=glyco.figgrp.562 : Core 3 and Core 4 generation.
A common structural theme in O-linked glycans is the addition of polylactosamine units to the various core structures. These are formed by the repetitive addition of galactose and N-acetyl-glucosamine units. Polylactosamine chains on O-linked glycans are often capped by the addition of a sialic acid residue (similar to neuraminic acid). If a fucose residue is also added, to the next to penultimate residue, a Sialyl-Lewis X (SLex) structure is formed.