A quality link comes from a relevant site with authority, real traffic, and is contextual. Spam is usually irrelevant, massive, and has no traffic.