An embedding layer contains a trainable weight matrix, which is used as a “lookup table” to transform the sparse indices into a dense vector representation.
E.g. pretrained embeddings might yield outputs, which are meaningful for particular works, such that the distance corresponds to a meaning. A well-known example would be the vector arithmetic with the words: “king - man = queen”, where the output vectors were subtracted and the “queen” vector was the result.
If you don’t train these embedding layers, the vector representation should be random.