How to have multiple condition on one column
SELECT NAME 
FROM STUDENTS s
WHERE EXISTS (SELECT 1 FROM GRADES WHERE ID = s.ID AND GRADE = 2)
    AND EXISTS (SELECT 1 FROM GRADES WHERE ID = s.ID AND GRADE = 6) 

or if you don't have multiple records for some grades for particular users:
SELECT NAME
FROM STUDENTS
JOIN GRADES ON STUDENTS.ID = GRADES.ID
WHERE GRADE = 2 OR GRADE = 6
GROUP BY ID, NAME
HAVING COUNT(1) = 2