Thanks for your replying.
And about the first question, I still have some questions. As you said below:

For example, lets say (‘Bruce’ , ‘Wayne’) is a training pair. Assuming that ‘Bruce’ and ‘Wayne’ words are present in your vocabulary with indices 100 and 200(just an example), nn.Embedding would allow you to pick the untrained word vectors for these two indices. This these two vectors would be brought closer to each other, resulting in their training.

How can these two vectors bring closer to each other. The following are some of my thoughts, and I don’t know whether it is right.

I want to make this problem easy to explain, so just assume there are only two words in all, so the word2index is {'Bruce':0, '‘Wayne’:1}. And we assume the initial weight of nn.Embedding is [[0.1,0.2,0.3],[0.2,0.5,0.6]](This is the random number).
When we input word ‘Wayne’(the indice 1) to the nn.Embedding, is it equal to Matrix multiplication, as shown in the picture below.

In this way, the network can do back-propagated to modify the weights of nn.Embedding. So, I think it is very similar to nn.Linear.