We have not been taught all this

what is pair<string,int> ?
what is emp[i].first used for ?
if he has made a pair of string and int then why has he used string for salary?
i am not able to understand the solution to this problem as we are not taught many things that are used in this video.

pair belongs to the STL in which you can use two inputs at a time, like for eg, in the question, you are given a string value and an integer, that need to be taken together , thus for eg, if you declare the STL as,
pair<string,int> employees[100005];,
after that you will input the values as,
cin>>name>>salary;
employees[i].first=name;
employees[i].second=salary;

and why did he make a separate string for name and salary?

Because you are supposed to take two inputs, one as the name of person and other as the salary , thus you need to create two separate variables, one as a string type and other as the integer type. I hope you understood the logic for this…

ya but he made both the variables of string type only

Actually, you can use both as strings also, since you can represent the nos as strings as well, its totally your choice how you wanna take it, either as a integer or as a string, in both ways the answer will be accepted.