Difference between spark SQL library vs spark sql context?

I want to understand the difference between these 2.

Library is nothing but jar file, SQLContext is class which provide functions to run queries.

So essentially do they provide different solutions? If we already have sqlcontext, can’t we achieve the same thing through spark sql?