I have a table with Students (ID and Name)
I have another Table with Friends (ID1 and ID2)
create table Students(ID int, name text);
create table Friends(ID1 int, ID2 int);
SELECT Friends.ID1, Friends.ID2 FROM Friends
from Friends, Strudents
SELECT id1, name
INNER JOIN students
ON friends.id1 = students.id
SELECT s1.NAME, s2.NAME
INNER JOIN STUDENT s1 ON FRIENDS.ID1 = s1.ID
INNER JOIN STUDENT s2 ON FRIENDS.ID2 = s2.ID
You seem new so I will lay out an approach.
Your final answer should give you the ids of both friends and the names corresponding to their ids in the students table.
Edit based on comments:
Here is how you would do the joins:
SELECT friends.id1, s1.name, friends.id2, s2.name FROM friends INNER JOIN students s1 ON friends.id1 = s1.id INNER JOIN students s2 ON friends id2 = s2.id
The trick is to actually join the students table twice, once for each friend. And then you just have to create aliases (s1 and s2) so you can distinguish between the two instances.