A token number is only an identity, like a part number. Nothing about the number for “coffee” tells the model it has anything to do with “tea”. An embedding replaces that single number with a long list of numbers, often hundreds or thousands of them, that together describe what the word means. Think of them as coordinates. Words with similar meanings land close together, and unrelated words land far apart.
The model learnt those positions during training by noticing which words turn up in the same company. Coffee and tea appear in the same kinds of sentences, so they end up near each other. “Bank” ends up somewhere between money and rivers, which is the problem the next entry, on attention, solves.
Embeddings matter outside the model too. Modern search takes your question, turns it into coordinates, and looks for the documents whose coordinates sit nearest. It is matching meaning rather than exact letters, which is why a search for “cheap flights” can find a page that says “low-cost airfares”. The same trick is how an AI assistant finds the right passage in a pile of your documents, and it is the job a vector database exists to do.