Your first sentence is ungrammatical, and it should be "how is the thing going at the library?"
Now, depending on the context, both can be correct.
When you use "the", the definite article, you are referring to a specific thing/person. So for the first sentence to make sense, both the speaker and listener(s) should know what "the thing" is, which could be an event. For example, if the library implemented a new system, and the speaker is curious about it, they can ask informally, "How is the thing (i.e. the new system) going at the library?"
When you only want to know about the library in general, nothing specific, you would ask "how are things going at the library?"