In medieval Europe, a bell rang every evening at a fixed hour, and townspeople were required by law to cover or extinguish their hearth fires. It was the "cover fire" bell, or, as it was referred to in Anglo-French, coverfeu (from the French verb meaning "to cover," and the word for "fire").
By the time the English version, curfew, appeared, the authorities no longer regulated hearth fires, but an evening bell continued to be rung for various purposes—whether to signal the close of day, an evening burial, or enforcement of some other evening regulation.
This "bell ringing at evening" became the first English sense of curfew. Not infrequently, the regulation signaled by the curfew involved regulating people's movement in the streets, and this led to the modern senses of the word.