A token is just an ID — a number. Before a model can do anything with it, that number becomes a list of numbers by looking it up in one giant, learned table. This is that table, and why similar words end up as near-neighbours.
Think of a Python list you index by number. The embedding matrix is exactly that — one row per token — and the token ID is the index.
Now every token is a point in space, so 'closeness' means 'similar'. The model learns to park related tokens near each other.
The matrix doesn't start out meaningful. It begins as random numbers, and training slowly slides the rows into place.
Now every token is a vector. Next, the transformer block — how those vectors look at each other and mix, so a word's meaning can shift with the words around it.