"T'was a student who gave me Francis... One spring afternoon I discovered a bowl on my desk, just a few inches of clear water in it. Floating on the surface was a flower petal... as I watched, it sank... just before it reached the bottom, it was transformed, into a wee fish. It was beautiful magic, wondrous to behold. The flower petal had come from a lily... your mother. The day I came downstairs, the day the bowl was empty, was the day your mother..."
-Horace Slughorn, regarding his pet fish Francis
Francis the fish disappeared because the spell cast by Lily ceased.
The flower petal set to float inside a bowl with a little water was transfigured. Lily transfigured the petal into a fish. When Lily died, the spell casted by Lily drew to a close.
"The day I came downstairs, the day the bowl was empty, was the day your mother..."
The spell stopped working because there are spells that only work when the original wizard who casted the spell is still alive.
Just like how the Full Body-Bind Curse of Dumbledore to Harry when they are at the Astronomy tower. When Snape killed Dumbledore, the Full-Body Bind Curse also disappeared together with the disappearance of its caster.
Harry realized he could move again. What was now holding him paralyzed against the wall was not magic, but horror and shock.
HARYY POTTER AND THE HALF BLOOD PRINCE
There are different kinds of spell. There are those that last until their casters have died, and there are those that work permanently.
(Regarding with the question Is a spell forever?) A good example of spells that doesn't last is the transfiguration charm. The effect of this spell wears off together with the disappearance of its owner. So there is two ways to remove its effect, whether the caster's death or a counter-charm for transfiguration spell. Unlike the stunning spell it has a counter-spell too, but stunning spell wears off even if it isn't counter-spelled.
Whereas, the curse that Ancient Egyptians put on their tomb lasts permanently. Just like with the Permanent Sticking Charm Sirius' mom casted, this can be countered. But it is extremely difficult to do so. However, the reason this is called permanent is because the spell works even if its caster is dead. The same way how the curse of Ancient Egyptians on their tombs still works even if those Ancient Egyptians are already dead.
NOTE: Not all spells, curses, or charms outlive their caster.