Here's how refills work.
"Refills" is plural. When it is a subject, the verb needs to agree with a third-person plural.
It is a subject in this sentence, and the relevant verb does agree. That verb is "work". The correct pairings are refills/work and a refill/works.
That's the subject/verb pairing of one of the two clauses in this sentence. There is another.
The entire clause "how refills work" is the subject of the matrix clause. That subordinate clause as a whole is a singular third-person subject. Consider these:
Here is the method.
Here are some methods.
The clause "how refills work" represents one method, or one explanation, or some other singular concept. Even though that clause contains a plural subject/verb agreement, the grammatical number of the subject of the subordinate clause does not affect the number for the verb of the matrix clause.
How refills work is one thing, no matter how many refills there are.