Is it an apple mystery snail? If so, they often close up for days. They will float too. You can tell they are dead when they come out of their shell and just hang from it. If you see one doing that. I mean just hanging outside of the shell limp. Then pick it up. The smell should tell you it has passed. They smell rotten. They also will natural withdraw into their shell if they are still alive. My oldest snail took several days to die and until then, he would try to return to his shell but he was just too weak. The older they get the more often they do the hibernating thing.