Great beats, rhymes, content, but also has to have an impact on the culture.
That's why I could listen to an album from a local MC that I feel is technically superior to that of a bigger name artist, but if it had zero cultural impact, it can't be a classic imo. It's just a really dope album.
Longevity is a factor as well, but I will say, there are things that are instant classics.